Class: ActiveInteractionMapper::Output::Text
- Inherits:
-
Object
- Object
- ActiveInteractionMapper::Output::Text
- Defined in:
- lib/active_interaction_mapper/output/text.rb
Instance Method Summary collapse
- #done ⇒ Object
-
#initialize(io) ⇒ Text
constructor
A new instance of Text.
- #pop(tp, normalized_class_name) ⇒ Object
- #push(tp, normalized_class_name) ⇒ Object
Constructor Details
#initialize(io) ⇒ Text
Returns a new instance of Text.
4 5 6 7 |
# File 'lib/active_interaction_mapper/output/text.rb', line 4 def initialize(io) @io = io @indent = '' end |
Instance Method Details
#done ⇒ Object
18 19 |
# File 'lib/active_interaction_mapper/output/text.rb', line 18 def done end |
#pop(tp, normalized_class_name) ⇒ Object
14 15 16 |
# File 'lib/active_interaction_mapper/output/text.rb', line 14 def pop(tp, normalized_class_name) @indent = @indent[0...-2] end |
#push(tp, normalized_class_name) ⇒ Object
9 10 11 12 |
# File 'lib/active_interaction_mapper/output/text.rb', line 9 def push(tp, normalized_class_name) @io.puts "#{@indent}#{normalized_class_name}\n" @indent << ' ' end |