Sha256: 04bac6621b53bc7b8bf05307c9cb877dce9332209b598443ca3e0ad3e008511f

Contents?: true

Size: 396 Bytes

Versions: 5

Compression:

Stored size: 396 Bytes

Contents

##
# NPR::Entity::Book
#
module NPR
  module Entity
    class Book < Base
      attr_accessor :id
      shallow_attribute "title"
      has_one "link", :class_name => NPR::Entity::Link

      #---------------------

      def initialize(json)
        @id = json["id"].to_i

        extract_shallow_attributes(json)
        create_relations(json)
      end
    end # Book
  end # Entity
end # NPR

Version data entries

5 entries across 5 versions & 1 rubygems

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