Class: PolarBear::Command::GlobalOptions
- Inherits:
-
Object
- Object
- PolarBear::Command::GlobalOptions
- Defined in:
- lib/polarbear/command/batch.rb
Instance Attribute Summary collapse
-
#interactive ⇒ Object
Returns the value of attribute interactive.
-
#must_be_quiet ⇒ Object
Returns the value of attribute must_be_quiet.
-
#show_browser ⇒ Object
Returns the value of attribute show_browser.
Instance Method Summary collapse
-
#initialize ⇒ GlobalOptions
constructor
A new instance of GlobalOptions.
- #to_hash ⇒ Object
Constructor Details
#initialize ⇒ GlobalOptions
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
#interactive ⇒ Object
Returns the value of attribute interactive.
9 10 11 |
# File 'lib/polarbear/command/batch.rb', line 9 def interactive @interactive end |
#must_be_quiet ⇒ Object
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_browser ⇒ Object
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_hash ⇒ Object
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 |