Class: Crunchbase::ProviderRelationship
- Inherits:
-
Relationship
- Object
- Relationship
- Crunchbase::ProviderRelationship
- Defined in:
- lib/crunchbase/relationships/provider_relationship.rb
Instance Attribute Summary collapse
-
#provider_name ⇒ Object
readonly
Returns the value of attribute provider_name.
-
#provider_permalink ⇒ Object
readonly
Returns the value of attribute provider_permalink.
Attributes inherited from Relationship
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(hash) ⇒ ProviderRelationship
constructor
A new instance of ProviderRelationship.
-
#provider(force_reload = false) ⇒ Object
Returns a representation of the associated person, loading from memory if previously fetched, unless force_reload is set to true.
Methods inherited from Relationship
Constructor Details
#initialize(hash) ⇒ ProviderRelationship
Returns a new instance of ProviderRelationship.
10 11 12 13 14 |
# File 'lib/crunchbase/relationships/provider_relationship.rb', line 10 def initialize(hash) super(hash) @provider_name = hash["provider"]["name"] @provider_permalink = hash["provider"]["permalink"] end |
Instance Attribute Details
#provider_name ⇒ Object (readonly)
Returns the value of attribute provider_name.
4 5 6 |
# File 'lib/crunchbase/relationships/provider_relationship.rb', line 4 def provider_name @provider_name end |
#provider_permalink ⇒ Object (readonly)
Returns the value of attribute provider_permalink.
4 5 6 |
# File 'lib/crunchbase/relationships/provider_relationship.rb', line 4 def provider_permalink @provider_permalink end |
Class Method Details
.array_from_relationship_list ⇒ Object
:nodoc:
6 7 8 |
# File 'lib/crunchbase/relationships/provider_relationship.rb', line 6 def self.array_from_relationship_list #:nodoc: raise CrunchException, "Method must be called from superclass Relationship" end |
Instance Method Details
#provider(force_reload = false) ⇒ Object
Returns a representation of the associated person, loading from memory if previously fetched, unless force_reload is set to true.
18 19 20 21 |
# File 'lib/crunchbase/relationships/provider_relationship.rb', line 18 def provider(force_reload=false) return @provider unless @provider.nil? || force_reload @provider = ServiceProvider.get(@provider_permalink) end |