Class: Quik::Opts

Inherits:
Object
  • Object
show all
Defined in:
lib/quik/cli/opts.rb

Instance Method Summary collapse

Instance Method Details

#merge_gli_options!(options = {}) ⇒ Object



7
8
9
10
# File 'lib/quik/cli/opts.rb', line 7

def merge_gli_options!( options = {} )
  @test    = true     if options[:test]    == true
  @verbose = true     if options[:verbose] == true
end

#test=(boolean) ⇒ Object



22
23
24
# File 'lib/quik/cli/opts.rb', line 22

def test=(boolean)
  @test = boolean
end

#test?Boolean

Returns:

  • (Boolean)


26
27
28
29
# File 'lib/quik/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/quik/cli/opts.rb', line 13

def verbose=(boolean)   # add: alias for debug ??
  @verbose = boolean
end

#verbose?Boolean

Returns:

  • (Boolean)


17
18
19
20
# File 'lib/quik/cli/opts.rb', line 17

def verbose?
  return false if @verbose.nil?   # default verbose/debug flag is false
  @verbose == true
end