Class: Compass::Exec::SwitchUI
- Inherits:
-
Object
- Object
- Compass::Exec::SwitchUI
- Includes:
- GlobalOptionsParser, ProjectOptionsParser
- Defined in:
- lib/compass/exec/switch_ui.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#options ⇒ Object
Returns the value of attribute options.
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(args) ⇒ SwitchUI
constructor
A new instance of SwitchUI.
- #run! ⇒ Object
Methods included from ProjectOptionsParser
#set_dir_or_path, #set_options, #set_project_options
Methods included from GlobalOptionsParser
#set_global_options, #set_options
Constructor Details
#initialize(args) ⇒ SwitchUI
Returns a new instance of SwitchUI.
10 11 12 13 14 |
# File 'lib/compass/exec/switch_ui.rb', line 10 def initialize(args) self.args = args self. = {} parse! end |
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args.
8 9 10 |
# File 'lib/compass/exec/switch_ui.rb', line 8 def args @args end |
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/compass/exec/switch_ui.rb', line 8 def @options end |
#opts ⇒ Object
Returns the value of attribute opts.
8 9 10 |
# File 'lib/compass/exec/switch_ui.rb', line 8 def opts @opts end |
Instance Method Details
#run! ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/compass/exec/switch_ui.rb', line 16 def run! begin perform! rescue Exception => e raise e if e.is_a? SystemExit if e.is_a?(::Compass::Error) || e.is_a?(OptionParser::ParseError) $stderr.puts e. else ::Compass::Exec::Helpers.report_error(e, @options) end return 1 end return 0 end |