Class: SmokeMonster::LazyCover

Inherits:
Cover show all
Includes:
StrictCoverMethods
Defined in:
lib/smoke_monster/lazy_cover.rb

Instance Method Summary collapse

Constructor Details

#initialize(block) ⇒ LazyCover

Returns a new instance of LazyCover.



5
6
7
# File 'lib/smoke_monster/lazy_cover.rb', line 5

def initialize(block)
  @block = block
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



18
19
20
21
# File 'lib/smoke_monster/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_subjectObject



10
11
12
13
# File 'lib/smoke_monster/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_classObject



9
# File 'lib/smoke_monster/lazy_cover.rb', line 9

alias :the_original_subject_from_the_base_class :the_original_subject