Sha256: 8bcd10f9588499db5a6c000610d1334cc2af80fe8a9f5950ab55b20997ee390b
Contents?: true
Size: 541 Bytes
Versions: 15
Compression:
Stored size: 541 Bytes
Contents
module RockRMS module Response class Base attr_reader :data def self.format(data) new(data).format end def initialize(data) @data = data end def format if data.is_a?(Array) data.map { |item| format_single(item) } else format_single(data) end end def to_h(dict, data) return {} if data.nil? dict.each_with_object({}) do |(l, r), object| object[l] = data[r] end end end end end
Version data entries
15 entries across 15 versions & 1 rubygems