Class: Junoser::Input
- Inherits:
-
Object
- Object
- Junoser::Input
- Defined in:
- lib/junoser/input.rb
Instance Method Summary collapse
-
#initialize(io_or_string) ⇒ Input
constructor
A new instance of Input.
- #read ⇒ Object
Constructor Details
#initialize(io_or_string) ⇒ Input
5 6 7 |
# File 'lib/junoser/input.rb', line 5 def initialize(io_or_string) @io_or_string = io_or_string end |
Instance Method Details
#read ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/junoser/input.rb', line 9 def read content = if @io_or_string.respond_to?(:read) @io_or_string.read else +@io_or_string.to_s end content = remove_blank_and_comment_line(content) content = unify_carriage_return(content) unify_square_brackets(content) end |