Sha256: b619b12833ccdbb01f7c3432d0b56a4d2727150b7115df03b64b6c9a51b8b23c
Contents?: true
Size: 451 Bytes
Versions: 8
Compression:
Stored size: 451 Bytes
Contents
module MoneyS3 module BaseElement EMPTY_ARRAY = [] attr_accessor :raw def initialize(raw) @raw = raw end private def at(locator) return nil if raw.nil? raw[locator] end def all(locator) return [] if raw.nil? result = raw[locator] if result.is_a? Hash [result] elsif result.is_a? Array result else EMPTY_ARRAY end end end end
Version data entries
8 entries across 8 versions & 1 rubygems