Class: Proxy::DHCP::RemoteISC::SubnetServiceInitializer
- Inherits:
-
CommonISC::IscSubnetServiceInitialization
- Object
- CommonISC::IscSubnetServiceInitialization
- Proxy::DHCP::RemoteISC::SubnetServiceInitializer
- Includes:
- Log
- Defined in:
- lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb
Instance Attribute Summary collapse
-
#config_file_path ⇒ Object
readonly
Returns the value of attribute config_file_path.
-
#leases_file_path ⇒ Object
readonly
Returns the value of attribute leases_file_path.
Instance Method Summary collapse
-
#initialize(config_file_path, leases_file_path, parser, subnet_service) ⇒ SubnetServiceInitializer
constructor
A new instance of SubnetServiceInitializer.
- #initialized_subnet_service ⇒ Object
- #read_config_file ⇒ Object
- #read_leases_file ⇒ Object
Constructor Details
#initialize(config_file_path, leases_file_path, parser, subnet_service) ⇒ SubnetServiceInitializer
Returns a new instance of SubnetServiceInitializer.
9 10 11 12 13 |
# File 'lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb', line 9 def initialize(config_file_path, leases_file_path, parser, subnet_service) @config_file_path = config_file_path @leases_file_path = leases_file_path super(subnet_service, parser) end |
Instance Attribute Details
#config_file_path ⇒ Object (readonly)
Returns the value of attribute config_file_path.
7 8 9 |
# File 'lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb', line 7 def config_file_path @config_file_path end |
#leases_file_path ⇒ Object (readonly)
Returns the value of attribute leases_file_path.
7 8 9 |
# File 'lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb', line 7 def leases_file_path @leases_file_path end |
Instance Method Details
#initialized_subnet_service ⇒ Object
15 16 17 18 19 |
# File 'lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb', line 15 def initialized_subnet_service load_configuration_file(read_config_file, config_file_path) load_leases_file(read_leases_file, leases_file_path) subnet_service end |
#read_config_file ⇒ Object
25 26 27 |
# File 'lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb', line 25 def read_config_file File.read(File.(config_file_path)) end |
#read_leases_file ⇒ Object
21 22 23 |
# File 'lib/smart_proxy_dhcp_remote_isc/subnet_service_initializer.rb', line 21 def read_leases_file File.read(File.(leases_file_path)) end |