Class: Trip::Event

Inherits:
BasicObject
Defined in:
lib/trip/event.rb

Constant Summary collapse

Kernel =
::Kernel
Time =
::Time
CALLS =
%w(call c-call)
RETURNS =
%w(return c-return)

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, event) ⇒ Event

Returns a new instance of Event.



9
10
11
12
13
# File 'lib/trip/event.rb', line 9

def initialize(name, event)
  @name = name
  @created_at = Time.now
  @event = event
end

Instance Attribute Details

#created_atObject (readonly)

Returns the value of attribute created_at.



7
8
9
# File 'lib/trip/event.rb', line 7

def created_at
  @created_at
end

#nameObject (readonly)

Returns the value of attribute name.



7
8
9
# File 'lib/trip/event.rb', line 7

def name
  @name
end

Instance Method Details

#__binding__Binding

Returns a binding for an instance of Trip::Event

Returns:

  • (Binding)

    returns a binding for an instance of Trip::Event



27
28
29
# File 'lib/trip/event.rb', line 27

def __binding__
  Kernel.binding
end

#inspectObject



19
20
21
# File 'lib/trip/event.rb', line 19

def inspect
  "#<Trip::Event:0x#{__id__.to_s(16)} name='#{name}' created_at='#{created_at}' file='#{file}' lineno='#{lineno}' module='#{mod}' method='#{method}' binding=#{binding.inspect}>"
end