Class: Kaiser::Dotter
- Inherits:
-
Object
- Object
- Kaiser::Dotter
- Defined in:
- lib/kaiser/dotter.rb
Overview
Prints dots for every line printed
Instance Attribute Summary collapse
-
#dotted ⇒ Object
Returns the value of attribute dotted.
Instance Method Summary collapse
- #method_missing(name, *value) ⇒ Object
-
#respond_to_missing?(name) ⇒ Boolean
rubocop:disable Lint/UselessMethodDefinition If we remove this method rubocop complains about it not existing instead.
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(name, *value) ⇒ Object
8 9 10 11 12 |
# File 'lib/kaiser/dotter.rb', line 8 def method_missing(name, *value) $stderr.print '.' @dotted = true super unless @dotted end |
Instance Attribute Details
#dotted ⇒ Object
Returns the value of attribute dotted.
6 7 8 |
# File 'lib/kaiser/dotter.rb', line 6 def dotted @dotted end |
Instance Method Details
#respond_to_missing?(name) ⇒ Boolean
rubocop:disable Lint/UselessMethodDefinition If we remove this method rubocop complains about it not existing instead.
16 17 18 |
# File 'lib/kaiser/dotter.rb', line 16 def respond_to_missing?(name) super end |