Module: Lite::Command::Internals::Callable
- Defined in:
- lib/lite/command/internals/callable.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
18 19 20 |
# File 'lib/lite/command/internals/callable.rb', line 18 def self.included(base) base.extend ClassMethods end |
Instance Method Details
#call ⇒ Object
34 35 36 |
# File 'lib/lite/command/internals/callable.rb', line 34 def call raise NotImplementedError, "call method not defined in #{self.class}" end |
#fault?(str = nil) ⇒ Boolean
46 47 48 |
# File 'lib/lite/command/internals/callable.rb', line 46 def fault?(str = nil) !success? && reason?(str) end |
#status ⇒ Object
38 39 40 |
# File 'lib/lite/command/internals/callable.rb', line 38 def status @status || SUCCESS end |
#success? ⇒ Boolean
42 43 44 |
# File 'lib/lite/command/internals/callable.rb', line 42 def success? status == SUCCESS end |