Module: Verbalize::Action::ClassMethods
- Defined in:
- lib/verbalize/action.rb
Instance Method Summary collapse
-
#call ⇒ Object
Because call/call! are defined when Action.input is called, they would not be defined when there is no input.
- #call! ⇒ Object (also: #!)
- #default_inputs ⇒ Object
- #defaults ⇒ Object
- #inputs ⇒ Object
- #optional_inputs ⇒ Object
- #required_inputs ⇒ Object
Instance Method Details
#call ⇒ Object
Because call/call! are defined when Action.input is called, they would not be defined when there is no input. So we pre-define them here, and if there is any input, they are overwritten
42 43 44 |
# File 'lib/verbalize/action.rb', line 42 def call __proxied_call end |
#call! ⇒ Object Also known as: !
46 47 48 |
# File 'lib/verbalize/action.rb', line 46 def call! __proxied_call! end |
#default_inputs ⇒ Object
27 28 29 |
# File 'lib/verbalize/action.rb', line 27 def default_inputs (@defaults || {}).keys end |
#defaults ⇒ Object
35 36 37 |
# File 'lib/verbalize/action.rb', line 35 def defaults @defaults end |
#inputs ⇒ Object
31 32 33 |
# File 'lib/verbalize/action.rb', line 31 def inputs required_inputs + optional_inputs + default_inputs end |
#optional_inputs ⇒ Object
23 24 25 |
# File 'lib/verbalize/action.rb', line 23 def optional_inputs @optional_inputs || [] end |
#required_inputs ⇒ Object
19 20 21 |
# File 'lib/verbalize/action.rb', line 19 def required_inputs @required_inputs || [] end |