Class: Compass::Exec::SubCommandUI

Inherits:
Object
  • Object
show all
Defined in:
lib/compass/exec/sub_command_ui.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(args) ⇒ SubCommandUI

Returns a new instance of SubCommandUI.



9
10
11
# File 'lib/compass/exec/sub_command_ui.rb', line 9

def initialize(args)
  self.args = args
end

Instance Attribute Details

#argsObject

Returns the value of attribute args.



7
8
9
# File 'lib/compass/exec/sub_command_ui.rb', line 7

def args
  @args
end

Instance Method Details

#run!Object



13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/compass/exec/sub_command_ui.rb', line 13

def run!
  begin
    return 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.message
    else
      ::Compass::Exec::Helpers.report_error(e, @options || {})
    end
    return 1
  end
end