Class: Crunchbase::Website
- Defined in:
- lib/crunchbase/website.rb
Constant Summary collapse
- RESOURCE_NAME =
'website'
- RESOURCE_LIST =
'websites'
Constants inherited from CBEntity
Instance Attribute Summary collapse
-
#created_at ⇒ Object
readonly
Returns the value of attribute created_at.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
-
#type_name ⇒ Object
readonly
Returns the value of attribute type_name.
-
#updated_at ⇒ Object
readonly
Returns the value of attribute updated_at.
-
#url ⇒ Object
readonly
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(json) ⇒ Website
constructor
A new instance of Website.
Methods inherited from CBEntity
array_from_list, category_lists_by_permalink, #fetch, get, list, lists_for_permalink, lists_for_person_permalink, parsing_from_list, search, total_items_from_list
Constructor Details
#initialize(json) ⇒ Website
Returns a new instance of Website.
14 15 16 17 18 19 20 |
# File 'lib/crunchbase/website.rb', line 14 def initialize(json) @url = json['url'] @type_name = json['type'] @title = json['title'] @created_at = Time.at(json['created_at']).utc @updated_at = Time.at(json['updated_at']).utc end |
Instance Attribute Details
#created_at ⇒ Object (readonly)
Returns the value of attribute created_at.
12 13 14 |
# File 'lib/crunchbase/website.rb', line 12 def created_at @created_at end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
12 13 14 |
# File 'lib/crunchbase/website.rb', line 12 def title @title end |
#type_name ⇒ Object (readonly)
Returns the value of attribute type_name.
12 13 14 |
# File 'lib/crunchbase/website.rb', line 12 def type_name @type_name end |
#updated_at ⇒ Object (readonly)
Returns the value of attribute updated_at.
12 13 14 |
# File 'lib/crunchbase/website.rb', line 12 def updated_at @updated_at end |
#url ⇒ Object (readonly)
Returns the value of attribute url.
12 13 14 |
# File 'lib/crunchbase/website.rb', line 12 def url @url end |