lib/flow_client/utils.rb in flow_client-0.2.1 vs lib/flow_client/utils.rb in flow_client-0.2.2
- old
+ new
@@ -45,21 +45,10 @@
Time.at(timestamp.seconds, epoch_micros)
end
def self.openstruct_to_json(struct)
struct.deep_to_h.to_json
- # struct.each_pair.map do |key, value|
- # [
- # key,
- # case value
- # when OpenStruct then value.deep_to_h
- # when Array then value.map {|el| el.class == OpenStruct ? el.deep_to_h : el}
- # else value
- # end
- # ]
- # end.to_h.to_json
end
-
end
end
class OpenStruct
def deep_to_h
\ No newline at end of file