Module: Zen::Service::Plugins::Executable::ClassMethods

Defined in:
lib/zen/service/plugins/executable.rb

Instance Method Summary collapse

Instance Method Details

#[](*args) ⇒ Object



168
169
170
# File 'lib/zen/service/plugins/executable.rb', line 168

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

#add_execution_prop(*props) ⇒ Object



159
160
161
# File 'lib/zen/service/plugins/executable.rb', line 159

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

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



163
164
165
# File 'lib/zen/service/plugins/executable.rb', line 163

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

#inherited(klass) ⇒ Object



154
155
156
157
# File 'lib/zen/service/plugins/executable.rb', line 154

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



172
173
174
175
# File 'lib/zen/service/plugins/executable.rb', line 172

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