Class: AWSMine::MineConfig
- Inherits:
-
Object
- Object
- AWSMine::MineConfig
- Defined in:
- lib/aws_minecraft/mine_config.rb
Overview
MineConfig is a configuration loader
Instance Attribute Summary collapse
-
#loglevel ⇒ Object
readonly
Returns the value of attribute loglevel.
-
#profile ⇒ Object
readonly
Returns the value of attribute profile.
-
#upload_path ⇒ Object
readonly
Returns the value of attribute upload_path.
Instance Method Summary collapse
-
#initialize ⇒ MineConfig
constructor
A new instance of MineConfig.
Constructor Details
#initialize ⇒ MineConfig
Returns a new instance of MineConfig.
7 8 9 10 11 12 13 |
# File 'lib/aws_minecraft/mine_config.rb', line 7 def initialize config = YAML.load_file(File.join(__dir__, '../../cfg/config.yml')) @loglevel = config['loglevel'] @profile = ENV.fetch('AWS_DEFAULT_PROFILE', 'default') # Upload path is used so files can sit anywhere. @upload_path = config['upload_path'] end |
Instance Attribute Details
#loglevel ⇒ Object (readonly)
Returns the value of attribute loglevel.
6 7 8 |
# File 'lib/aws_minecraft/mine_config.rb', line 6 def loglevel @loglevel end |
#profile ⇒ Object (readonly)
Returns the value of attribute profile.
6 7 8 |
# File 'lib/aws_minecraft/mine_config.rb', line 6 def profile @profile end |
#upload_path ⇒ Object (readonly)
Returns the value of attribute upload_path.
6 7 8 |
# File 'lib/aws_minecraft/mine_config.rb', line 6 def upload_path @upload_path end |