Module: Subtle::CoverMethods

Included in:
Cover
Defined in:
lib/subtle/cover.rb

Instance Method Summary collapse

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(meth, *args, &blk) ⇒ Object



9
10
11
12
13
# File 'lib/subtle/cover.rb', line 9

def method_missing(meth, *args, &blk)
  @subject.send(meth, *args, &blk)
rescue
  Subtle::Cover.new Object.new
end

Instance Method Details

#initialize(subject) ⇒ Object



5
6
7
# File 'lib/subtle/cover.rb', line 5

def initialize(subject)
  @subject = subject
end

#the_original_subjectObject



15
16
17
# File 'lib/subtle/cover.rb', line 15

def the_original_subject
  @subject
end