Sha256: 007273c9216d0dd6b4de3b49f6552d8b03dcb130c9ff4b2e631860abb72c3e22
Contents?: true
Size: 783 Bytes
Versions: 12
Compression:
Stored size: 783 Bytes
Contents
# frozen_string_literal: true require 'easy/jsonapi/field' require 'easy/jsonapi/document/resource/attributes' require 'easy/jsonapi/name_value_pair' module JSONAPI class Document class Resource class Attributes < JSONAPI::NameValuePairCollection # An individual attribute in a JSON:API Attributes object class Attribute < JSONAPI::NameValuePair attr_reader :field # @param name [String] The name of an attribute # @param value [String] The value of an attribute # @param type [Any] The type of an attribute value def initialize(name, value, type: String) @field = JSONAPI::Field.new(name, type: type) super(name, value) end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems