Sha256: ec2f4b8b9e4ca0502fd4e608b040263abd03ca3ca09e1b13dae74bc61dbd4692

Contents?: true

Size: 625 Bytes

Versions: 4

Compression:

Stored size: 625 Bytes

Contents

# encoding: utf-8

# https://api.crunchbase.com/v/2/organization/facebook/images

module Crunchbase
  class Image < CBEntity

    RESOURCE_NAME = 'image'
    RESOURCE_LIST = 'images'

    attr_reader :type_name, :title, :path, :original_path, :created_at, :updated_at
    
    def initialize(json)
      @type_name      = json['type']
      @title          = json['title']
      @original_path  = json['path']
      @path           = json['path'] && Crunchbase::API.image_url + json['path']
      @created_at     = Time.at(json['created_at']).utc
      @updated_at     = Time.at(json['updated_at']).utc
    end
    
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
crunchbase_v2-1.1.2 lib/crunchbase/image.rb
crunchbase_v2-1.1.1 lib/crunchbase/image.rb
crunchbase_v2-1.1.0 lib/crunchbase/image.rb
crunchbase_v2-1.0.0 lib/crunchbase/image.rb