Class: Isp

Inherits:
Object
  • Object
show all
Defined in:
lib/isp_unity/isp.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#enabledObject

Returns the value of attribute enabled.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def enabled
  @enabled
end

#gatewayObject

Returns the value of attribute gateway.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def gateway
  @gateway
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def id
  @id
end

#interfaceObject

Returns the value of attribute interface.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def interface
  @interface
end

#ip_addressObject

Returns the value of attribute ip_address.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def ip_address
  @ip_address
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def name
  @name
end

#networkObject

Returns the value of attribute network.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def network
  @network
end

#onlineObject

Returns the value of attribute online.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def online
  @online
end

#subnetObject

Returns the value of attribute subnet.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def subnet
  @subnet
end

#weightObject

Returns the value of attribute weight.



3
4
5
# File 'lib/isp_unity/isp.rb', line 3

def weight
  @weight
end