Sha256: 624f7847191042b864d03c5bf0b631640f5874a4598e0dad25a4d22be15c4901

Contents?: true

Size: 638 Bytes

Versions: 6

Compression:

Stored size: 638 Bytes

Contents

# encoding: utf-8

# http://api.crunchbase.com/v/2/organization/facebook/news

module Crunchbase
  class NewItem < CBEntity
    RESOURCE_LIST = 'news'

    attr_reader :type_name, :url, :author, :posted_on, :type, :title, :created_at, 
                :updated_at
                
    def initialize(json)
      @type_name      = json['type']
      @url            = json['url']
      @author         = json['author']
      @posted_on      = json['posted_on'] && DateTime.parse(json['posted_on'])
      @title          = json['title']
      @created_at     = json['created_at']
      @updated_at     = json['updated_at']
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
crunchbase_v2-0.0.6 lib/crunchbase/new_item.rb
crunchbase_v2-0.0.5 lib/crunchbase/new_item.rb
crunchbase_v2-0.0.4 lib/crunchbase/new_item.rb
crunchbase_v2-0.0.3 lib/crunchbase/new_item.rb
crunchbase_v2-0.0.2 lib/crunchbase/new_item.rb
crunchbase_v2-0.0.1 lib/crunchbase/new_item.rb