Sha256: f5aff38dd8b3f340e903efb07595f36b4b0efa025c70bcbbdc26f0db3ef70cf1

Contents?: true

Size: 466 Bytes

Versions: 4

Compression:

Stored size: 466 Bytes

Contents

##
# NPR::Entity::RelatedLink
#
module NPR
  module Entity
    class RelatedLink < Base
      attr_accessor :id, :type
      
      has_many "links", :key => "link", :class_name => NPR::Entity::Link
      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

4 entries across 4 versions & 1 rubygems

Version Path
npr-1.1.0 lib/npr/entity/related_link.rb
npr-0.1.2 lib/npr/entity/related_link.rb
npr-0.1.1 lib/npr/entity/related_link.rb
npr-0.1.0 lib/npr/entity/related_link.rb