Sha256: 7da7144522e9159fb2a8c4e70eb94d1cafe7c8479b249cefbe6e8dc5ba1e012b

Contents?: true

Size: 413 Bytes

Versions: 3

Compression:

Stored size: 413 Bytes

Contents

##
# NPR::Entity::Program
#
module NPR
  module Entity
    class Program < Base
      attr_accessor :id, :code, :content

      #---------------------
    
      def initialize(json)
        @id      = json["id"].to_i
        @content = json["$text"]
        @code    = json["code"]
      end

      #---------------------
    
      def to_s
        @content
      end
    end # Program
  end # Entity
end # NPR

Version data entries

3 entries across 3 versions & 1 rubygems

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