Class: Metaphor
- Inherits:
-
Object
- Object
- Metaphor
- Defined in:
- lib/metaphor.rb,
lib/metaphor/processor/detour.rb,
lib/metaphor/input/stdin_input.rb,
lib/metaphor/processor/wiretap.rb,
lib/metaphor/processor/print_message.rb,
lib/metaphor/processor/json_processor.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
'1.0.0'
Instance Attribute Summary collapse
-
#processors ⇒ Object
Returns the value of attribute processors.
Instance Method Summary collapse
- #call(input) ⇒ Object
-
#initialize ⇒ Metaphor
constructor
A new instance of Metaphor.
Constructor Details
#initialize ⇒ Metaphor
Returns a new instance of Metaphor.
5 6 7 |
# File 'lib/metaphor.rb', line 5 def initialize self.processors = [] end |
Instance Attribute Details
#processors ⇒ Object
Returns the value of attribute processors.
3 4 5 |
# File 'lib/metaphor.rb', line 3 def processors @processors end |
Instance Method Details
#call(input) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/metaphor.rb', line 9 def call(input) if input.respond_to?(:gets) while = input.gets end else input end end |