Class: NetboxClientRuby::IPAM::PrefixStatus
- Inherits:
-
Object
- Object
- NetboxClientRuby::IPAM::PrefixStatus
- Defined in:
- lib/netbox_client_ruby/api/ipam/prefix.rb
Instance Attribute Summary collapse
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(status_value) ⇒ PrefixStatus
constructor
A new instance of PrefixStatus.
Constructor Details
#initialize(status_value) ⇒ PrefixStatus
Returns a new instance of PrefixStatus.
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/netbox_client_ruby/api/ipam/prefix.rb', line 34 def initialize(status_value) @value = status_value @label = case status_value when 0 then 'Container'.freeze when 1 then 'Active'.freeze when 2 then 'Reserved'.freeze when 3 then 'Deprecated'.freeze else 'UNDEFINED'.freeze end end |
Instance Attribute Details
#label ⇒ Object (readonly)
Returns the value of attribute label.
32 33 34 |
# File 'lib/netbox_client_ruby/api/ipam/prefix.rb', line 32 def label @label end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
32 33 34 |
# File 'lib/netbox_client_ruby/api/ipam/prefix.rb', line 32 def value @value end |