Class: JSONCombiner
- Inherits:
-
Object
- Object
- JSONCombiner
- Defined in:
- lib/jsoncombiner.rb
Overview
Fields to choose steps to combine Handling for getting input from steps
Instance Method Summary collapse
-
#concatenate ⇒ Object
Concatenates JSONs together.
-
#initialize(*inputjsons) ⇒ JSONCombiner
constructor
A new instance of JSONCombiner.
Constructor Details
#initialize(*inputjsons) ⇒ JSONCombiner
Returns a new instance of JSONCombiner.
10 11 12 |
# File 'lib/jsoncombiner.rb', line 10 def initialize(*inputjsons) @inputjsons = inputjsons end |
Instance Method Details
#concatenate ⇒ Object
Concatenates JSONs together
15 16 17 18 19 20 21 22 |
# File 'lib/jsoncombiner.rb', line 15 def concatenate savearray = Array.new @inputjsons.each do |j| savearray = savearray + JSON.parse(j) end return savearray.to_json end |