Class: Lightwave::VCR

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

Instance Method Summary collapse

Constructor Details

#initializeVCR

Returns a new instance of VCR.



80
81
82
# File 'lib/lightwave.rb', line 80

def initialize
  @messages = []
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(method, *args, &block) ⇒ Object



83
84
85
# File 'lib/lightwave.rb', line 83

def method_missing(method, *args, &block)
  @messages << [method, args, block]
end

Instance Method Details

#play_back_to(obj) ⇒ Object



86
87
88
89
90
# File 'lib/lightwave.rb', line 86

def play_back_to(obj)
  @messages.each do |method, args, block|
    obj.send(method, *args, &block)
  end
end