Sha256: 7b4f94880a83f14887c302f056fd295ff909d4587a84bc3b93e17855be332295
Contents?: true
Size: 639 Bytes
Versions: 29
Compression:
Stored size: 639 Bytes
Contents
# frozen_string_literal: true module Dato module Local class JsonApiMeta attr_reader :payload def initialize(payload) @payload = payload || {} end def [](key) @payload[key] end def respond_to_missing?(method, include_private = false) if @payload.key?(method) true else super end end private def method_missing(method, *arguments, &block) return super unless arguments.empty? if @payload.key?(method) @payload[method] else super end end end end end
Version data entries
29 entries across 29 versions & 1 rubygems