Module: FunctionalLightService::Organizer::Macros
- Defined in:
- lib/functional-light-service/organizer.rb
Instance Method Summary collapse
-
#after_actions(*logic) ⇒ Object
This looks like an accessor, but it's used as a macro in the Organizer.
- #after_actions=(logic) ⇒ Object
- #aliases(key_hash) ⇒ Object
- #append_after_actions(action) ⇒ Object
- #append_before_actions(action) ⇒ Object
-
#before_actions(*logic) ⇒ Object
This looks like an accessor, but it's used as a macro in the Organizer.
- #before_actions=(logic) ⇒ Object
- #remove_before_actions(action) ⇒ Object
Instance Method Details
#after_actions(*logic) ⇒ Object
This looks like an accessor, but it's used as a macro in the Organizer
115 116 117 |
# File 'lib/functional-light-service/organizer.rb', line 115 def after_actions(*logic) self.after_actions = logic end |
#after_actions=(logic) ⇒ Object
119 120 121 |
# File 'lib/functional-light-service/organizer.rb', line 119 def after_actions=(logic) @after_actions = logic.nil? ? nil : [logic].flatten end |
#aliases(key_hash) ⇒ Object
90 91 92 |
# File 'lib/functional-light-service/organizer.rb', line 90 def aliases(key_hash) @aliases = key_hash end |
#append_after_actions(action) ⇒ Object
123 124 125 126 |
# File 'lib/functional-light-service/organizer.rb', line 123 def append_after_actions(action) @after_actions ||= [] @after_actions.push(action) end |
#append_before_actions(action) ⇒ Object
104 105 106 107 |
# File 'lib/functional-light-service/organizer.rb', line 104 def append_before_actions(action) @before_actions ||= [] @before_actions.push(action) end |
#before_actions(*logic) ⇒ Object
This looks like an accessor, but it's used as a macro in the Organizer
96 97 98 |
# File 'lib/functional-light-service/organizer.rb', line 96 def before_actions(*logic) self.before_actions = logic end |
#before_actions=(logic) ⇒ Object
100 101 102 |
# File 'lib/functional-light-service/organizer.rb', line 100 def before_actions=(logic) @before_actions = logic.nil? ? nil : [logic].flatten end |
#remove_before_actions(action) ⇒ Object
109 110 111 |
# File 'lib/functional-light-service/organizer.rb', line 109 def remove_before_actions(action) @before_actions&.delete(action) end |