Module: Excom::Plugins::Executable::ClassMethods

Defined in:
lib/excom/plugins/executable.rb

Instance Method Summary collapse

Instance Method Details

#[](*args) ⇒ Object



167
168
169
# File 'lib/excom/plugins/executable.rb', line 167

def [](*args)
  call(*args).result
end

#add_execution_prop(*props) ⇒ Object



158
159
160
# File 'lib/excom/plugins/executable.rb', line 158

def add_execution_prop(*props)
  self::State.add_prop(*props)
end

#call(*args) ⇒ Object Also known as: execute



162
163
164
# File 'lib/excom/plugins/executable.rb', line 162

def call(*args)
  new(*args).execute
end

#inherited(klass) ⇒ Object



153
154
155
156
# File 'lib/excom/plugins/executable.rb', line 153

def inherited(klass)
  klass.const_set(:State, Class.new(self::State))
  klass::State.prop_names.replace(self::State.prop_names.dup)
end

#method_added(name) ⇒ Object



171
172
173
174
# File 'lib/excom/plugins/executable.rb', line 171

def method_added(name)
  private :execute! if name == :execute!
  super if defined? super
end