Module: Hai::ActionMods::ClassMethods
- Defined in:
- lib/hai/action_mods.rb
Instance Method Summary collapse
-
#action(action, &block) ⇒ Object
TODO: validate CRUD actions.
- #action_mods ⇒ Object
Instance Method Details
#action(action, &block) ⇒ Object
TODO: validate CRUD actions
19 20 21 22 23 |
# File 'lib/hai/action_mods.rb', line 19 def action(action, &block) action_mods[action] = lambda do |instance, context| block.call(instance, context) end end |
#action_mods ⇒ Object
14 15 16 |
# File 'lib/hai/action_mods.rb', line 14 def action_mods @action_mods ||= {} end |