Class: Guard::Options
- Inherits:
-
Thor::CoreExt::HashWithIndifferentAccess
- Object
- Thor::CoreExt::HashWithIndifferentAccess
- Guard::Options
- Defined in:
- lib/guard/options.rb
Overview
A class that holds options. Can be instantiated with default options.
Direct Known Subclasses
Instance Method Summary collapse
-
#fetch(name) ⇒ Object
workaround for: github.com/erikhuda/thor/issues/504.
-
#initialize(opts = {}, default_opts = {}) ⇒ Options
constructor
Initializes an Guard::Options object.
Constructor Details
#initialize(opts = {}, default_opts = {}) ⇒ Options
Initializes an Guard::Options object. ‘default_opts` is merged into `opts`.
13 14 15 |
# File 'lib/guard/options.rb', line 13 def initialize(opts = {}, default_opts = {}) super(default_opts.merge(opts || {})) end |
Instance Method Details
#fetch(name) ⇒ Object
workaround for: github.com/erikhuda/thor/issues/504
18 19 20 |
# File 'lib/guard/options.rb', line 18 def fetch(name) super(name.to_s) end |