Sha256: 3c1696e00d0dc5f9ef28bb8b5c78f38d2018e60c3c55a91abd0cdc66d31b0f08
Contents?: true
Size: 525 Bytes
Versions: 12
Compression:
Stored size: 525 Bytes
Contents
# frozen_string_literal: true module ShotgunApiRuby Entity = Struct.new(:type, :attributes, :relationships, :id, :links) do def method_missing(name, *args, &block) if attributes.respond_to?(name) define_singleton_method(name) do attributes.public_send(name) end public_send(name) else super end end def respond_to_missing?(name, _private_methods = false) attributes.respond_to?(name) || super end end end
Version data entries
12 entries across 12 versions & 1 rubygems