Class: Tagmv::Options
- Inherits:
-
Object
- Object
- Tagmv::Options
- Defined in:
- lib/tagmv/options.rb
Instance Attribute Summary collapse
-
#additions ⇒ Object
Returns the value of attribute additions.
Instance Method Summary collapse
-
#initialize(opts = {}) ⇒ Options
constructor
A new instance of Options.
- #input ⇒ Object
- #load_config ⇒ Object
- #options ⇒ Object
Constructor Details
#initialize(opts = {}) ⇒ Options
Returns a new instance of Options.
4 5 6 |
# File 'lib/tagmv/options.rb', line 4 def initialize(opts = {}) @additions = opts end |
Instance Attribute Details
#additions ⇒ Object
Returns the value of attribute additions.
3 4 5 |
# File 'lib/tagmv/options.rb', line 3 def additions @additions end |
Instance Method Details
#input ⇒ Object
8 9 10 |
# File 'lib/tagmv/options.rb', line 8 def input Tagmv::CommandLine.parse || {} end |
#load_config ⇒ Object
12 13 14 |
# File 'lib/tagmv/options.rb', line 12 def load_config Tagmv::Config.new.load end |
#options ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/tagmv/options.rb', line 16 def return if @options @options = load_config @options.merge(additions) @options.merge(input) end |