Class: ProgressBar::Components::EstimatedTimer::As
- Inherits:
-
Object
- Object
- ProgressBar::Components::EstimatedTimer::As
- Defined in:
- lib/progress_bar/components/estimated_timer.rb
Instance Method Summary collapse
-
#initialize(subject, ancestor) ⇒ As
constructor
A new instance of As.
- #method_missing(sym, *args, &blk) ⇒ Object
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 |