Class: Kaiser::Dotter

Inherits:
Object
  • Object
show all
Defined in:
lib/kaiser/dotter.rb

Overview

Prints dots for every line printed

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#dottedObject

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.

Returns:

  • (Boolean)


16
17
18
# File 'lib/kaiser/dotter.rb', line 16

def respond_to_missing?(name)
  super
end