Module: Actions::Action::ClassMethods
- Defined in:
- lib/actions/action.rb
Instance Method Summary collapse
- #call(context = {}) ⇒ Object
- #input(attribute, type: Object, required: false, mutable: false) ⇒ Object
- #inputs ⇒ Object
- #output(attribute, type: Object) ⇒ Object
- #outputs ⇒ Object
Instance Method Details
#call(context = {}) ⇒ Object
21 22 23 |
# File 'lib/actions/action.rb', line 21 def call(context={}) new(context).call end |
#input(attribute, type: Object, required: false, mutable: false) ⇒ Object
25 26 27 |
# File 'lib/actions/action.rb', line 25 def input(attribute, type: Object, required: false, mutable: false) self.inputs[attribute.to_s] = { type: type, mutable: mutable, required: required } end |
#inputs ⇒ Object
33 34 35 |
# File 'lib/actions/action.rb', line 33 def inputs @inputs ||= {} end |
#output(attribute, type: Object) ⇒ Object
29 30 31 |
# File 'lib/actions/action.rb', line 29 def output(attribute, type: Object) self.outputs[attribute.to_s] = { type: type } end |
#outputs ⇒ Object
37 38 39 |
# File 'lib/actions/action.rb', line 37 def outputs @outputs ||= {} end |