Class: Accidentally::Proxy

Inherits:
Object show all
Defined in:
lib/accidentally.rb

Instance Method Summary collapse

Constructor Details

#initialize(object) ⇒ Proxy

Returns a new instance of Proxy.



18
19
20
21
22
# File 'lib/accidentally.rb', line 18

def initialize object
  @object = object
  @args = []
  @block = nil
end

Instance Method Details

#==(result) ⇒ Object



24
25
26
# File 'lib/accidentally.rb', line 24

def == result
  MadHax.find_how @object, result, @args, &@block
end

#with(*args, &block) ⇒ Object



28
29
30
31
32
# File 'lib/accidentally.rb', line 28

def with *args, &block
  @args.concat args
  @block = block
  self
end