Sha256: 1ca6d108d59799ec58393ced2e20aa627cd4006941052555f5d8da0aea371c15

Contents?: true

Size: 419 Bytes

Versions: 1

Compression:

Stored size: 419 Bytes

Contents

module Typekit
  module Record
    class Variation < Element::Base
      include Element::Association
      include Element::Serialization

      has_many :libraries
      belongs_to :family

      def initialize(*arguments)
        arguments[-1] = { id: arguments[-1] } if arguments[-1].is_a?(String)
        super(*arguments)
      end

      def serialize
        id.to_s.split(':').last
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
typekit-client-0.0.6 lib/typekit/record/variation.rb