Class: Subtle::LazyCover
Instance Method Summary
collapse
Constructor Details
#initialize(block_that_creates_the_object) ⇒ LazyCover
Returns a new instance of LazyCover.
5
6
7
|
# File 'lib/subtle/lazy_cover.rb', line 5
def initialize(block_that_creates_the_object)
@block = block_that_creates_the_object
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(meth, *args, &blk) ⇒ Object
18
19
20
21
|
# File 'lib/subtle/lazy_cover.rb', line 18
def method_missing(meth, *args, &blk)
setup_the_subject
old_method_missing meth, *args, &blk
end
|
Instance Method Details
#the_original_subject ⇒ Object
10
11
12
13
|
# File 'lib/subtle/lazy_cover.rb', line 10
def the_original_subject
setup_the_subject
the_original_subject_from_the_base_class
end
|
#the_original_subject_from_the_base_class ⇒ Object
9
|
# File 'lib/subtle/lazy_cover.rb', line 9
alias :the_original_subject_from_the_base_class :the_original_subject
|