Class: Crunchbase::Model::SimpleOrganization
- Defined in:
- lib/crunchbase/model/simple_organization.rb
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
Attributes inherited from Entity
Instance Method Summary collapse
-
#initialize(json) ⇒ SimpleOrganization
constructor
A new instance of SimpleOrganization.
- #property_keys ⇒ Object
Methods inherited from Entity
#convert_date!, #date_keys, #fetch, #instance_multi_relationship_objects, #instance_relationships_object, #instance_timestamps, #one_to_many, #one_to_one, #parse_hash_items, #relationship_lists, #set_relationships_object, #set_variables, #setup_relationships_data!, #special_relationship, #verify_item?
Methods included from Request::Client
#api, #array_from_list, #funding_rounds_lists, #get, #kclass_name, #list, #organization_lists, #parsing_from_list, #person_lists, #total_items_from_list
Constructor Details
#initialize(json) ⇒ SimpleOrganization
Returns a new instance of SimpleOrganization.
7 8 9 10 11 12 13 14 15 |
# File 'lib/crunchbase/model/simple_organization.rb', line 7 def initialize(json) property_keys.each do |v| instance_variable_set("@#{v}", json[v] || nil) end %w(created_at updated_at).each do |v| instance_variable_set("@#{v}", Time.at(json[v])) unless json[v].nil? end end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
5 6 7 |
# File 'lib/crunchbase/model/simple_organization.rb', line 5 def created_at @created_at end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/crunchbase/model/simple_organization.rb', line 5 def name @name end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/crunchbase/model/simple_organization.rb', line 5 def path @path end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
5 6 7 |
# File 'lib/crunchbase/model/simple_organization.rb', line 5 def type @type end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
5 6 7 |
# File 'lib/crunchbase/model/simple_organization.rb', line 5 def updated_at @updated_at end |
Instance Method Details
#property_keys ⇒ Object
17 18 19 20 21 |
# File 'lib/crunchbase/model/simple_organization.rb', line 17 def property_keys %w( type name path created_at updated_at ) end |