Class: OhMyLog::Log::Effect
- Inherits:
-
Object
- Object
- OhMyLog::Log::Effect
- Defined in:
- lib/oh_my_log/effect.rb
Instance Attribute Summary collapse
-
#changes ⇒ Object
readonly
Returns the value of attribute changes.
-
#receiver ⇒ Object
readonly
Returns the value of attribute receiver.
Instance Method Summary collapse
-
#initialize(receiver) ⇒ Effect
constructor
A new instance of Effect.
- #to_s ⇒ Object
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
#changes ⇒ Object (readonly)
Returns the value of attribute changes.
6 7 8 |
# File 'lib/oh_my_log/effect.rb', line 6 def changes @changes end |
#receiver ⇒ Object (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_s ⇒ Object
13 14 15 |
# File 'lib/oh_my_log/effect.rb', line 13 def to_s "#{@receiver.class.to_s}[#{@receiver.id}] => #{@changes}" end |