Class: MrHyde::Opts
- Inherits:
-
Object
- Object
- MrHyde::Opts
- Defined in:
- lib/mrhyde/cli/opts.rb
Instance Method Summary collapse
- #merge_gli_options!(options = {}) ⇒ Object
- #test=(boolean) ⇒ Object
- #test? ⇒ Boolean
-
#verbose=(boolean) ⇒ Object
add: alias for debug ??.
- #verbose? ⇒ Boolean
Instance Method Details
#merge_gli_options!(options = {}) ⇒ Object
7 8 9 10 |
# File 'lib/mrhyde/cli/opts.rb', line 7 def ( = {} ) @test = true if [:test] == true @verbose = true if [:verbose] == true end |
#test=(boolean) ⇒ Object
22 23 24 |
# File 'lib/mrhyde/cli/opts.rb', line 22 def test=(boolean) @test = boolean end |
#test? ⇒ Boolean
26 27 28 29 |
# File 'lib/mrhyde/cli/opts.rb', line 26 def test? return false if @test.nil? # default test/dry-run flag is false @test == true end |
#verbose=(boolean) ⇒ Object
add: alias for debug ??
13 14 15 |
# File 'lib/mrhyde/cli/opts.rb', line 13 def verbose=(boolean) # add: alias for debug ?? @verbose = boolean end |
#verbose? ⇒ Boolean
17 18 19 20 |
# File 'lib/mrhyde/cli/opts.rb', line 17 def verbose? return false if @verbose.nil? # default verbose/debug flag is false @verbose == true end |