Module: App::Command

Defined in:
lib/has_helpers/app/command.rb

Defined Under Namespace

Modules: ClassMethods, MaskingInstanceMethods, StubbedRunInstanceMethod Classes: FailureError, Result, ResultProxy

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object



48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/has_helpers/app/command.rb', line 48

def self.included(klass)
  unless klass.method_defined?(:run)
    klass.include(StubbedRunInstanceMethod)
  end

  klass.prepend(MaskingInstanceMethods)
  klass.extend(ClassMethods)

  klass.class_eval do
    attr_writer :result
    private :result= # We don't want users to set the result object, so it is made private (not that it would _really_ stop them from doing so).
  end
end