Sha256: 9ddc5d2654062def7455ee4d89c4145f1806a71e5d7553ee92cf589461562b6f

Contents?: true

Size: 418 Bytes

Versions: 5

Compression:

Stored size: 418 Bytes

Contents

##
# NPR::Entity::RelatedLink
#
module NPR
  module Entity
    class RelatedLink < Base
      include NPR::Concern::LinksAssociation

      attr_accessor :id, :type
      shallow_attribute "caption"

      def initialize(json)
        extract_shallow_attributes(json)
        create_relations(json)

        @id   = json["id"].to_i
        @type = json["type"]
      end
    end # RelatedLink
  end # Entity
end # NPR

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
npr-3.0.0 lib/npr/entity/related_link.rb
npr-2.0.2 lib/npr/entity/related_link.rb
npr-2.0.1 lib/npr/entity/related_link.rb
npr-2.0.0 lib/npr/entity/related_link.rb
npr-1.2.0 lib/npr/entity/related_link.rb