Class: Dashy::ConfigYml
- Inherits:
-
Object
- Object
- Dashy::ConfigYml
- Defined in:
- lib/dashy/config_yml.rb
Constant Summary collapse
- DEFAULT_TIMEOUT =
5
Instance Method Summary collapse
- #app_id ⇒ Object
-
#initialize(file_path) ⇒ ConfigYml
constructor
A new instance of ConfigYml.
- #timeout ⇒ Object
- #url ⇒ Object
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_id ⇒ Object
11 12 13 |
# File 'lib/dashy/config_yml.rb', line 11 def app_id @yaml['app_id'] end |
#timeout ⇒ Object
19 20 21 |
# File 'lib/dashy/config_yml.rb', line 19 def timeout @yaml['timeout'] || DEFAULT_TIMEOUT end |
#url ⇒ Object
15 16 17 |
# File 'lib/dashy/config_yml.rb', line 15 def url @yaml['url'] end |