Class: ActiveRecord::Events::Macro
- Inherits:
-
Object
- Object
- ActiveRecord::Events::Macro
- Defined in:
- lib/active_record/events/macro.rb
Instance Method Summary collapse
-
#initialize(event_name, options) ⇒ Macro
constructor
A new instance of Macro.
- #to_s ⇒ Object
Constructor Details
#initialize(event_name, options) ⇒ Macro
Returns a new instance of Macro.
4 5 6 7 |
# File 'lib/active_record/events/macro.rb', line 4 def initialize(event_name, ) @event_name = event_name.to_s @options = end |
Instance Method Details
#to_s ⇒ Object
9 10 11 |
# File 'lib/active_record/events/macro.rb', line 9 def to_s "has_event :#{event_name}#{}" end |