Class: Elevate::TaskContext
- Inherits:
-
Object
- Object
- Elevate::TaskContext
- Defined in:
- lib/elevate/task_context.rb
Instance Method Summary collapse
-
#initialize(args, &block) ⇒ TaskContext
constructor
A new instance of TaskContext.
Constructor Details
#initialize(args, &block) ⇒ TaskContext
Returns a new instance of TaskContext.
3 4 5 6 7 8 9 10 |
# File 'lib/elevate/task_context.rb', line 3 def initialize(args, &block) = class << self; self; end .send(:define_method, :execute, &block) args.each do |key, value| instance_variable_set("@#{key}", value) end end |