Class: Bl::Config
Instance Method Summary collapse
- #[](key) ⇒ Object
- #default_config ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
10 11 12 13 14 15 16 17 |
# File 'lib/bl/config.rb', line 10 def initialize file = ::File.join(Dir.home, Bl::CONFIG_FILE) if ::File.exist?(file) @config = YAML.load_file(file) else @config = nil end end |
Instance Method Details
#[](key) ⇒ Object
19 20 21 |
# File 'lib/bl/config.rb', line 19 def [](key) @config[key] end |
#default_config ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/bl/config.rb', line 23 def default_config { space_id: '', api_key: '', project_key: '', issue: { default: { projectId: nil, issueTypeId: nil, priorityId: 3, assigneeId: nil } } } end |