A Parameter object is valid if
- it has a name
- it has a value
Included modules
- 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