Module: LightService::Organizer::Macros

Defined in:
lib/light-service/organizer.rb

Instance Method Summary collapse

Instance Method Details

#after_actions(*logic) ⇒ Object

This looks like an accessor, but it's used as a macro in the Organizer



120
121
122
# File 'lib/light-service/organizer.rb', line 120

def after_actions(*logic)
  self.after_actions = logic
end

#after_actions=(logic) ⇒ Object



124
125
126
# File 'lib/light-service/organizer.rb', line 124

def after_actions=(logic)
  @after_actions = [logic].flatten
end

#aliases(key_hash) ⇒ Object



99
100
101
# File 'lib/light-service/organizer.rb', line 99

def aliases(key_hash)
  @aliases = key_hash
end

#append_after_actions(action) ⇒ Object



128
129
130
131
# File 'lib/light-service/organizer.rb', line 128

def append_after_actions(action)
  @after_actions ||= []
  @after_actions.push(action)
end

#append_before_actions(action) ⇒ Object



113
114
115
116
# File 'lib/light-service/organizer.rb', line 113

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



105
106
107
# File 'lib/light-service/organizer.rb', line 105

def before_actions(*logic)
  self.before_actions = logic
end

#before_actions=(logic) ⇒ Object



109
110
111
# File 'lib/light-service/organizer.rb', line 109

def before_actions=(logic)
  @before_actions = [logic].flatten
end