Class: EnumItem
- Inherits:
-
Struct
- Object
- Struct
- EnumItem
- Defined in:
- lib/f5/icontrol/common/enum_item.rb
Overview
This is a helper type to encapsulate iControl enumerations in a way which easily gives us access to the member as well as the value, since the SOAP API and the Savon serializers seem to use the string version of the member name rather than the value.
Additional iControl enumerations can be generated using nimbletest.com/live with ‘t’ as a column separator and the following substitution pattern:
# $2 $0 = EnumItem.new(‘$0’, ‘$1’)
Instance Attribute Summary collapse
-
#member ⇒ Object
Returns the value of attribute member.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
Instance Attribute Details
#member ⇒ Object
Returns the value of attribute member
15 16 17 |
# File 'lib/f5/icontrol/common/enum_item.rb', line 15 def member @member end |
#value ⇒ Object
Returns the value of attribute value
15 16 17 |
# File 'lib/f5/icontrol/common/enum_item.rb', line 15 def value @value end |
Instance Method Details
#to_i ⇒ Object
20 21 22 |
# File 'lib/f5/icontrol/common/enum_item.rb', line 20 def to_i self.value end |
#to_s ⇒ Object
16 17 18 |
# File 'lib/f5/icontrol/common/enum_item.rb', line 16 def to_s self.member end |