Class: CheapAdvice::ActivationRecord
- Inherits:
-
Object
- Object
- CheapAdvice::ActivationRecord
- Defined in:
- lib/cheap_advice.rb
Overview
Represents the activation record of a method invocation.
Instance Attribute Summary (collapse)
-
- (Object) advised
readonly
Returns the value of attribute advised.
-
- (Object) args
readonly
Returns the value of attribute args.
-
- (Object) block
readonly
Returns the value of attribute block.
-
- (Object) body
Returns the value of attribute body.
-
- (Object) error
Returns the value of attribute error.
-
- (Object) rcvr
readonly
Returns the value of attribute rcvr.
-
- (Object) result
Returns the value of attribute result.
Instance Method Summary (collapse)
- - (Object) advice
- - (Object) caller(offset = 0)
-
- (ActivationRecord) initialize(*args)
constructor
A new instance of ActivationRecord.
- - (Object) method
- - (Object) mod
Constructor Details
- (ActivationRecord) initialize(*args)
A new instance of ActivationRecord
307 308 309 |
# File 'lib/cheap_advice.rb', line 307 def initialize *args @advised, @rcvr, @args, @block = *args end |
Instance Attribute Details
- (Object) advised (readonly)
Returns the value of attribute advised
304 305 306 |
# File 'lib/cheap_advice.rb', line 304 def advised @advised end |
- (Object) args (readonly)
Returns the value of attribute args
304 305 306 |
# File 'lib/cheap_advice.rb', line 304 def args @args end |
- (Object) block (readonly)
Returns the value of attribute block
304 305 306 |
# File 'lib/cheap_advice.rb', line 304 def block @block end |
- (Object) body
Returns the value of attribute body
305 306 307 |
# File 'lib/cheap_advice.rb', line 305 def body @body end |
- (Object) error
Returns the value of attribute error
305 306 307 |
# File 'lib/cheap_advice.rb', line 305 def error @error end |
- (Object) rcvr (readonly)
Returns the value of attribute rcvr
304 305 306 |
# File 'lib/cheap_advice.rb', line 304 def rcvr @rcvr end |
- (Object) result
Returns the value of attribute result
305 306 307 |
# File 'lib/cheap_advice.rb', line 305 def result @result end |
Instance Method Details
- (Object) advice
311 312 313 |
# File 'lib/cheap_advice.rb', line 311 def advice @advised.advice end |
- (Object) caller(offset = 0)
323 324 325 |
# File 'lib/cheap_advice.rb', line 323 def caller(offset = 0) ::Kernel.caller(offset + 2) end |
- (Object) method
319 320 321 |
# File 'lib/cheap_advice.rb', line 319 def method @advised.method end |
- (Object) mod
315 316 317 |
# File 'lib/cheap_advice.rb', line 315 def mod @advised.mod end |