Class: Psei::Formatter
- Inherits:
-
Object
- Object
- Psei::Formatter
- Defined in:
- lib/psei/formatter.rb
Overview
Formats the parsed data
Instance Method Summary collapse
-
#initialize ⇒ Formatter
constructor
A new instance of Formatter.
- #process(arr) ⇒ Object
Constructor Details
#initialize ⇒ Formatter
Returns a new instance of Formatter.
4 5 6 |
# File 'lib/psei/formatter.rb', line 4 def initialize @arr = [] end |
Instance Method Details
#process(arr) ⇒ Object
8 9 10 11 |
# File 'lib/psei/formatter.rb', line 8 def process arr @arr = arr @arr ? to_hash : {} end |