Class: Munge::Bootloader

Inherits:
Object
  • Object
show all
Defined in:
lib/munge/bootloader.rb

Overview

This class is useful for loading the application.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(root_path:) ⇒ Bootloader

Returns a new instance of Bootloader.

Parameters:

  • root_path (String)

    Absolute path to munge directory



5
6
7
8
9
10
11
12
# File 'lib/munge/bootloader.rb', line 5

def initialize(root_path:)
  @root_path = root_path
  @setup_path = File.join(root_path, "setup.rb")
  @rules_path = File.join(root_path, "rules.rb")

  config_path = File.join(root_path, "config.rb")
  @config = Munge::PreInit.new(config_path).config
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



17
18
19
# File 'lib/munge/bootloader.rb', line 17

def config
  @config
end

#root_pathObject (readonly)

Returns the value of attribute root_path.



14
15
16
# File 'lib/munge/bootloader.rb', line 14

def root_path
  @root_path
end

#rules_pathObject (readonly)

Returns the value of attribute rules_path.



16
17
18
# File 'lib/munge/bootloader.rb', line 16

def rules_path
  @rules_path
end

#setup_pathObject (readonly)

Returns the value of attribute setup_path.



15
16
17
# File 'lib/munge/bootloader.rb', line 15

def setup_path
  @setup_path
end