Class: Emittance::EventLookup::EventKlassName
- Inherits:
-
EventKlassConverter
- Object
- EventKlassConverter
- Emittance::EventLookup::EventKlassName
- Defined in:
- lib/emittance/event_lookup.rb
Overview
Derives an event class name from an identifier.
Constant Summary
Constants inherited from EventKlassConverter
Emittance::EventLookup::EventKlassConverter::KLASS_NAME_SUFFIX
Instance Method Summary collapse
-
#generate ⇒ Object
Generates an event class name for the given identifier.
-
#initialize(identifier) ⇒ EventKlassName
constructor
A new instance of EventKlassName.
Methods included from Helpers::StringHelpers
#camel_case, #clean_up_punctuation, #snake_case
Constructor Details
#initialize(identifier) ⇒ EventKlassName
Returns a new instance of EventKlassName.
145 146 147 |
# File 'lib/emittance/event_lookup.rb', line 145 def initialize(identifier) @identifier = identifier end |
Instance Method Details
#generate ⇒ Object
Generates an event class name for the given identifier.
150 151 152 153 |
# File 'lib/emittance/event_lookup.rb', line 150 def generate base_name = camel_case identifier.to_s decorate_klass_name base_name end |