Class: OhMyLog::Log::Effect

Inherits:
Object
  • Object
show all
Defined in:
lib/oh_my_log/effect.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(receiver) ⇒ Effect

Returns a new instance of Effect.



8
9
10
11
# File 'lib/oh_my_log/effect.rb', line 8

def initialize(receiver)
  @receiver = receiver
  @changes = receiver.previous_changes
end

Instance Attribute Details

#changesObject (readonly)

Returns the value of attribute changes.



6
7
8
# File 'lib/oh_my_log/effect.rb', line 6

def changes
  @changes
end

#receiverObject (readonly)

Returns the value of attribute receiver.



5
6
7
# File 'lib/oh_my_log/effect.rb', line 5

def receiver
  @receiver
end

Instance Method Details

#to_sObject



13
14
15
# File 'lib/oh_my_log/effect.rb', line 13

def to_s
  "#{@receiver.class.to_s}[#{@receiver.id}] => #{@changes}"
end