Class: Ardb::RecordSpy::Callback
- Inherits:
-
Object
- Object
- Ardb::RecordSpy::Callback
- Defined in:
- lib/ardb/record_spy.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, *args, &block) ⇒ Callback
constructor
A new instance of Callback.
Constructor Details
#initialize(type, *args, &block) ⇒ Callback
Returns a new instance of Callback.
214 215 216 217 218 219 |
# File 'lib/ardb/record_spy.rb', line 214 def initialize(type, *args, &block) @type = type.to_sym @options = args.last.kind_of?(::Hash) ? args.pop : {} @args = args @block = block end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
212 213 214 |
# File 'lib/ardb/record_spy.rb', line 212 def args @args end |
#block ⇒ Object (readonly)
Returns the value of attribute block.
212 213 214 |
# File 'lib/ardb/record_spy.rb', line 212 def block @block end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
212 213 214 |
# File 'lib/ardb/record_spy.rb', line 212 def @options end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
212 213 214 |
# File 'lib/ardb/record_spy.rb', line 212 def type @type end |