Module: GroupedMessage::ClassMethods

Defined in:
lib/grouped_message.rb

Instance Method Summary collapse

Instance Method Details

#functional_with_groups(function, group = nil) ⇒ Object



28
29
30
31
32
33
34
35
# File 'lib/grouped_message.rb', line 28

def functional_with_groups(function, group=nil)
  messages = for_function(function)
  if group
    messages.belonging_to(group).first
  else
    messages.ungrouped.first
  end
end