Class: ActiveRecord::Events::Macro

Inherits:
Object
  • Object
show all
Defined in:
lib/active_record/events/macro.rb

Instance Method Summary collapse

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, options)
  @event_name = event_name.to_s
  @options = options
end

Instance Method Details

#to_sObject



9
10
11
# File 'lib/active_record/events/macro.rb', line 9

def to_s
  "has_event :#{event_name}#{options_list}"
end