Class: ProgressBar::Components::EstimatedTimer::As

Inherits:
Object
  • Object
show all
Defined in:
lib/progress_bar/components/estimated_timer.rb

Instance Method Summary collapse

Constructor Details

#initialize(subject, ancestor) ⇒ As

Returns a new instance of As.



77
78
79
80
# File 'lib/progress_bar/components/estimated_timer.rb', line 77

def initialize(subject, ancestor)
  @subject = subject
  @ancestor = ancestor
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



82
83
84
# File 'lib/progress_bar/components/estimated_timer.rb', line 82

def method_missing(sym, *args, &blk)
  @ancestor.instance_method(sym).bind(@subject).call(*args,&blk)
end