Class: PolarBear::Command::GlobalOptions

Inherits:
Object
  • Object
show all
Defined in:
lib/polarbear/command/batch.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeGlobalOptions

Returns a new instance of GlobalOptions.



12
13
14
15
16
# File 'lib/polarbear/command/batch.rb', line 12

def initialize
  @show_browser = false
  @interactive = false
  @must_be_quiet = true
end

Instance Attribute Details

#interactiveObject

Returns the value of attribute interactive.



9
10
11
# File 'lib/polarbear/command/batch.rb', line 9

def interactive
  @interactive
end

#must_be_quietObject

Returns the value of attribute must_be_quiet.



10
11
12
# File 'lib/polarbear/command/batch.rb', line 10

def must_be_quiet
  @must_be_quiet
end

#show_browserObject

Returns the value of attribute show_browser.



8
9
10
# File 'lib/polarbear/command/batch.rb', line 8

def show_browser
  @show_browser
end

Instance Method Details

#to_hashObject



18
19
20
21
22
23
24
# File 'lib/polarbear/command/batch.rb', line 18

def to_hash
  Hash result = {}
  result[:'no-browser'] = '' if !@show_browser
  result[:'non-interactive'] = '' if !@show_browser
  result[:'quiet'] = (@must_be_quiet ?'yes':'no')
  result
end