Class: AWSMine::MineConfig

Inherits:
Object
  • Object
show all
Defined in:
lib/aws_minecraft/mine_config.rb

Overview

MineConfig is a configuration loader

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMineConfig

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

#loglevelObject (readonly)

Returns the value of attribute loglevel.



6
7
8
# File 'lib/aws_minecraft/mine_config.rb', line 6

def loglevel
  @loglevel
end

#profileObject (readonly)

Returns the value of attribute profile.



6
7
8
# File 'lib/aws_minecraft/mine_config.rb', line 6

def profile
  @profile
end

#upload_pathObject (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