class Emittance::EventLookup::EventKlassName

Derives an event class name from an identifier.

Attributes

identifier[R]

Public Class Methods

new(identifier) click to toggle source
# File lib/emittance/event_lookup.rb, line 145
def initialize(identifier)
  @identifier = identifier
end

Public Instance Methods

generate() click to toggle source

Generates an event class name for the given identifier.

# File lib/emittance/event_lookup.rb, line 150
def generate
  base_name = camel_case identifier.to_s
  decorate_klass_name base_name
end

Private Instance Methods

decorate_klass_name(klass_name_str) click to toggle source
# File lib/emittance/event_lookup.rb, line 159
def decorate_klass_name(klass_name_str)
  "#{klass_name_str}#{KLASS_NAME_SUFFIX}"
end