Class: Gossiper::ClassResolver

Inherits:
Object
  • Object
show all
Defined in:
lib/gossiper/class_resolver.rb

Instance Method Summary collapse

Instance Method Details

#resolve(notification_type) ⇒ Object



4
5
6
7
8
9
# File 'lib/gossiper/class_resolver.rb', line 4

def resolve(notification_type)
  klass = notification_type.split('_').map do |v|
    v.titleize
  end.join('')
  "Notifications::#{klass}Notification"
end