Class: Junoser::Display::Set
- Inherits:
-
Object
- Object
- Junoser::Display::Set
- Defined in:
- lib/junoser/display/set.rb
Instance Method Summary collapse
- #commit_check ⇒ Object
-
#initialize(io_or_string) ⇒ Set
constructor
A new instance of Set.
- #transform ⇒ Object
Constructor Details
#initialize(io_or_string) ⇒ Set
10 11 12 |
# File 'lib/junoser/display/set.rb', line 10 def initialize(io_or_string) @input = io_or_string end |
Instance Method Details
#commit_check ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/junoser/display/set.rb', line 24 def commit_check begin lines = transform rescue StandardError warn $ERROR_INFO return false end parser = Junoser::Parser.new parser.parse_lines(lines) end |
#transform ⇒ Object
14 15 16 17 18 19 20 21 22 |
# File 'lib/junoser/display/set.rb', line 14 def transform result = +'' process do |current_stack, str| result << transform_line(current_stack, str) << "\n" end result end |