Class: Dashy::ConfigYml

Inherits:
Object
  • Object
show all
Defined in:
lib/dashy/config_yml.rb

Constant Summary collapse

DEFAULT_TIMEOUT =
5

Instance Method Summary collapse

Constructor Details

#initialize(file_path) ⇒ ConfigYml

Returns a new instance of ConfigYml.



7
8
9
# File 'lib/dashy/config_yml.rb', line 7

def initialize file_path
  @yaml ||= YAML.load_file(file_path)
end

Instance Method Details

#app_idObject



11
12
13
# File 'lib/dashy/config_yml.rb', line 11

def app_id
  @yaml['app_id']
end

#timeoutObject



19
20
21
# File 'lib/dashy/config_yml.rb', line 19

def timeout
  @yaml['timeout'] || DEFAULT_TIMEOUT
end

#urlObject



15
16
17
# File 'lib/dashy/config_yml.rb', line 15

def url
  @yaml['url']
end