Sha256: e4c1598fc19b8ea207957bbc712800a8a87ed7aaa574c73cc931bd4fb8665e46
Contents?: true
Size: 695 Bytes
Versions: 5
Compression:
Stored size: 695 Bytes
Contents
## # NPR::Entity::BookEdition # module NPR module Entity class BookEdition < Base attr_accessor :id, :format_num shallow_attribute "isbn", "publisher", "pubDate", "pagination", "listPrice" has_one "book", :class_name => NPR::Entity::Book #--------------------- # Note that the "format" property is represented on this # object as "format_num", because of Kernel's "format" def initialize(json) @id = json["id"].to_i if json["format"] @format_num = json["format"]["$text"].to_i end extract_shallow_attributes(json) create_relations(json) end end # BookEdition end # Entity end # NPR
Version data entries
5 entries across 5 versions & 1 rubygems