Module: Amistad::ActiveRecord::HasActions::ClassMethods
- Defined in:
- lib/amistad/active_record/has_actions.rb
Instance Method Summary collapse
- #has_predefined_action(action) ⇒ Object
- #predefine_action(action, options = nil) ⇒ Object
- #predefined_actions ⇒ Object
- #remove_all_predefined_actions ⇒ Object
Instance Method Details
#has_predefined_action(action) ⇒ Object
19 20 21 |
# File 'lib/amistad/active_record/has_actions.rb', line 19 def has_predefined_action(action) predefined_actions.has_key?(action) end |
#predefine_action(action, options = nil) ⇒ Object
15 16 17 |
# File 'lib/amistad/active_record/has_actions.rb', line 15 def predefine_action(action, = nil) predefined_actions[action] = Action.new() end |
#predefined_actions ⇒ Object
11 12 13 |
# File 'lib/amistad/active_record/has_actions.rb', line 11 def predefined_actions @@predefined_actions ||= {} end |
#remove_all_predefined_actions ⇒ Object
23 24 25 |
# File 'lib/amistad/active_record/has_actions.rb', line 23 def remove_all_predefined_actions @@predefined_actions = {} end |