Class: NetboxClientRuby::IPAM::PrefixStatus

Inherits:
Object
  • Object
show all
Defined in:
lib/netbox_client_ruby/api/ipam/prefix.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#labelObject (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

#valueObject (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