Class RCAP::CAP_1_0::Parameter

  1. lib/rcap/cap_1_0/parameter.rb
Parent: Object

A Parameter object is valid if

  • it has a name
  • it has a value

Methods

public class

  1. new

public instance

  1. ==
  2. to_s

Included modules

  1. Validation

Attributes

name [RW]
value [RW]

Public class methods

new ( attributes = {} )
[show source]
# File lib/rcap/cap_1_0/parameter.rb, line 21
      def initialize( attributes = {} )
        @name = attributes[ :name ]
        @value = attributes[ :value ]
      end

Public instance methods

== ( other )

Two parameters are equivalent if they have the same name and value.

[show source]
# File lib/rcap/cap_1_0/parameter.rb, line 51
      def ==( other )
        [ self.name, self.value ] == [ other.name, other.value ]
      end
to_s ()

Returns a string representation of the parameter of the form

name: value
[show source]
# File lib/rcap/cap_1_0/parameter.rb, line 42
      def to_s
        self.inspect
      end