Sha256: 6235ac5a2b75151e4d9b124e5dfe4eb794ba31bf5da20157947175d52253310f

Contents?: true

Size: 457 Bytes

Versions: 4

Compression:

Stored size: 457 Bytes

Contents

##
# NPR::Entity::Author
#
module NPR
  module Entity
    class Author < Base
      attr_accessor :id, :num
      shallow_attribute "title"
      has_one "link", :class_name => NPR::Entity::Link
      
      #-----------------
      
      def initialize(json)
        @id  = json["id"].to_i
        @num = json["num"].to_i
        
        create_relations(json)
        extract_shallow_attributes(json)
      end
    end # Author
  end # Entity
end # NPR

Version data entries

4 entries across 4 versions & 1 rubygems

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