Class: Spy::Blueprint

Inherits:
Object
  • Object
show all
Defined in:
lib/spy/blueprint.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(target, msg, type) ⇒ Blueprint

Returns a new instance of Blueprint.



5
6
7
8
9
10
# File 'lib/spy/blueprint.rb', line 5

def initialize(target, msg, type)
  @target = target
  @msg = msg
  @type = type
  @caller = _caller
end

Instance Attribute Details

#msgObject (readonly)

Returns the value of attribute msg.



3
4
5
# File 'lib/spy/blueprint.rb', line 3

def msg
  @msg
end

#targetObject (readonly)

Returns the value of attribute target.



3
4
5
# File 'lib/spy/blueprint.rb', line 3

def target
  @target
end

#typeObject (readonly)

Returns the value of attribute type.



3
4
5
# File 'lib/spy/blueprint.rb', line 3

def type
  @type
end

Instance Method Details

#_callerObject



12
# File 'lib/spy/blueprint.rb', line 12

alias :_caller :caller

#callerObject



14
15
16
# File 'lib/spy/blueprint.rb', line 14

def caller
  @caller
end

#to_sObject



18
19
20
# File 'lib/spy/blueprint.rb', line 18

def to_s
  [@target.object_id, @msg, @type].join("|")
end