Class: Compass::Commands::Base
- Inherits:
-
Object
- Object
- Compass::Commands::Base
show all
- Includes:
- Actions
- Defined in:
- lib/compass/commands/base.rb
Instance Attribute Summary collapse
Attributes included from Actions
#logger
Class Method Summary
collapse
Instance Method Summary
collapse
Methods included from Actions
#basename, #copy, #directory, #log_action, #process_erb, #relativize, #remove, #separate, #strip_trailing_separator, #write_file
Constructor Details
#initialize(working_path, options) ⇒ Base
12
13
14
15
|
# File 'lib/compass/commands/base.rb', line 12
def initialize(working_path, options)
self.working_path = working_path.to_s
self.options = options
end
|
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
10
11
12
|
# File 'lib/compass/commands/base.rb', line 10
def options
@options
end
|
#working_path ⇒ Object
Returns the value of attribute working_path.
10
11
12
|
# File 'lib/compass/commands/base.rb', line 10
def working_path
@working_path
end
|
Class Method Details
.register(command_name) ⇒ Object
4
5
6
|
# File 'lib/compass/commands/base.rb', line 4
def self.register(command_name)
Compass::Commands[command_name] = self
end
|
Instance Method Details
#execute ⇒ Object
17
18
19
|
# File 'lib/compass/commands/base.rb', line 17
def execute
perform
end
|
#failed! ⇒ Object
29
30
31
|
# File 'lib/compass/commands/base.rb', line 29
def failed!
@failed = true
end
|
21
22
23
|
# File 'lib/compass/commands/base.rb', line 21
def perform
raise StandardError.new("Not Implemented")
end
|
#successful? ⇒ Boolean
25
26
27
|
# File 'lib/compass/commands/base.rb', line 25
def successful?
!@failed
end
|