Sha256: 3d576b60cddb00472e02fca1f1381bdc6b48e04c5228961014884620ed3f0148

Contents?: true

Size: 629 Bytes

Versions: 4

Compression:

Stored size: 629 Bytes

Contents

# encoding: utf-8

# https://api.crunchbase.com/v/2/organization/#{permalink}/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.6 lib/crunchbase/image.rb
crunchbase_v2-1.1.5 lib/crunchbase/image.rb
crunchbase_v2-1.1.4 lib/crunchbase/image.rb
crunchbase_v2-1.1.3 lib/crunchbase/image.rb