Class: Psei::Formatter

Inherits:
Object
  • Object
show all
Defined in:
lib/psei/formatter.rb

Overview

Formats the parsed data

Instance Method Summary collapse

Constructor Details

#initializeFormatter

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