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
17
18
19
# File 'lib/isp_unity/isp.rb', line 5

def initialize(config_isp)
  @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']
  @protocol   = config_isp['protocol']
  @port       = config_isp['port']
  @network_ip = config_isp['network_ip']
  @priority   = config_isp['priority']
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

#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

#network_ipObject

Returns the value of attribute network_ip.



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

def network_ip
  @network_ip
end

#onlineObject

Returns the value of attribute online.



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

def online
  @online
end

#portObject

Returns the value of attribute port.



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

def port
  @port
end

#priorityObject

Returns the value of attribute priority.



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

def priority
  @priority
end

#protocolObject

Returns the value of attribute protocol.



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

def protocol
  @protocol
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