Class: Ardb::RecordSpy::Callback

Inherits:
Object
  • Object
show all
Defined in:
lib/ardb/record_spy.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type, *args, &block) ⇒ Callback

Returns a new instance of Callback.



116
117
118
119
120
121
# File 'lib/ardb/record_spy.rb', line 116

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

#argsObject (readonly)

Returns the value of attribute args.



114
115
116
# File 'lib/ardb/record_spy.rb', line 114

def args
  @args
end

#blockObject (readonly)

Returns the value of attribute block.



114
115
116
# File 'lib/ardb/record_spy.rb', line 114

def block
  @block
end

#optionsObject (readonly)

Returns the value of attribute options.



114
115
116
# File 'lib/ardb/record_spy.rb', line 114

def options
  @options
end

#typeObject (readonly)

Returns the value of attribute type.



114
115
116
# File 'lib/ardb/record_spy.rb', line 114

def type
  @type
end