Class: Crabfarm::OStructOutputBuilder

Inherits:
Object
  • Object
show all
Defined in:
lib/crabfarm/adapters/output/ostruct.rb

Class Method Summary collapse

Class Method Details

.prepareObject



5
6
7
8
# File 'lib/crabfarm/adapters/output/ostruct.rb', line 5

def self.prepare
  # TODO: maybe wrap open struct in a class that automatically generate other openstruct when nested properties are accessed
  OpenStruct.new
end

.serialize(_output) ⇒ Object



10
11
12
# File 'lib/crabfarm/adapters/output/ostruct.rb', line 10

def self.serialize(_output)
  _output.to_h
end