Class: Isp
- Inherits:
-
Object
- Object
- Isp
- Defined in:
- lib/isp_unity/isp.rb
Instance Attribute Summary collapse
-
#enabled ⇒ Object
Returns the value of attribute enabled.
-
#gateway ⇒ Object
Returns the value of attribute gateway.
-
#id ⇒ Object
Returns the value of attribute id.
-
#interface ⇒ Object
Returns the value of attribute interface.
-
#ip_address ⇒ Object
Returns the value of attribute ip_address.
-
#name ⇒ Object
Returns the value of attribute name.
-
#network ⇒ Object
Returns the value of attribute network.
-
#online ⇒ Object
Returns the value of attribute online.
-
#subnet ⇒ Object
Returns the value of attribute subnet.
-
#weight ⇒ Object
Returns the value of attribute weight.
Instance Method Summary collapse
-
#initialize(config_isp) ⇒ Isp
constructor
A new instance of Isp.
Constructor Details
#initialize(config_isp) ⇒ Isp
Returns a new instance of Isp.
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/isp_unity/isp.rb', line 5 def initialize(config_isp) @id = config_isp['id'] @name = config_isp['name'] @interface = config_isp['interface'] @gateway = config_isp['gateway'] @subnet = config_isp['subnet'] @network = config_isp['network'] @online = config_isp["online"] @enabled = config_isp['enabled'] @ip_address = config_isp['ip_address'] @weight = config_isp['weight'] end |
Instance Attribute Details
#enabled ⇒ Object
Returns the value of attribute enabled.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def enabled @enabled end |
#gateway ⇒ Object
Returns the value of attribute gateway.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def gateway @gateway end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def id @id end |
#interface ⇒ Object
Returns the value of attribute interface.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def interface @interface end |
#ip_address ⇒ Object
Returns the value of attribute ip_address.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def ip_address @ip_address end |
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def name @name end |
#network ⇒ Object
Returns the value of attribute network.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def network @network end |
#online ⇒ Object
Returns the value of attribute online.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def online @online end |
#subnet ⇒ Object
Returns the value of attribute subnet.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def subnet @subnet end |
#weight ⇒ Object
Returns the value of attribute weight.
3 4 5 |
# File 'lib/isp_unity/isp.rb', line 3 def weight @weight end |