Class: FlickrMocks::Models::CommonsInstitution
- Inherits:
-
Object
- Object
- FlickrMocks::Models::CommonsInstitution
- Defined in:
- lib/flickr_mocks/models/commons_institution.rb
Instance Method Summary collapse
-
#==(other) ⇒ Object
returns true if supplied object is equivalent to self.
-
#flickr_url ⇒ Object
returns flickr web address for the institution.
-
#initialize(object) ⇒ CommonsInstitution
constructor
A new instance of CommonsInstitution.
-
#initialize_copy(orig) ⇒ Object
compares value for internal state rather than object_id.
-
#launch_date ⇒ Object
returns the launch date for the commons institution.
-
#license_url ⇒ Object
returns the url that describes the licensing.
-
#owner_id ⇒ Object
(also: #owner)
returns the Owner id for the commons institution.
-
#owner_name ⇒ Object
returns name of the commons institution.
-
#site_url ⇒ Object
returns external web address for the institution.
Constructor Details
#initialize(object) ⇒ CommonsInstitution
Returns a new instance of CommonsInstitution.
5 6 7 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 5 def initialize(object) self.delegated_to_object = object end |
Instance Method Details
#==(other) ⇒ Object
returns true if supplied object is equivalent to self
41 42 43 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 41 def ==(other) @delegated_to_object == other.instance_eval('@delegated_to_object') end |
#flickr_url ⇒ Object
returns flickr web address for the institution
26 27 28 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 26 def flickr_url get_url(:flickr) end |
#initialize_copy(orig) ⇒ Object
compares value for internal state rather than object_id
46 47 48 49 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 46 def initialize_copy(orig) super @delegated_to_object = @delegated_to_object.clone end |
#launch_date ⇒ Object
returns the launch date for the commons institution
10 11 12 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 10 def launch_date @delegated_to_object.date_launch end |
#license_url ⇒ Object
returns the url that describes the licensing
36 37 38 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 36 def license_url get_url(:license) end |
#owner_id ⇒ Object Also known as: owner
returns the Owner id for the commons institution
15 16 17 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 15 def owner_id @delegated_to_object.nsid end |
#owner_name ⇒ Object
returns name of the commons institution
21 22 23 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 21 def owner_name @delegated_to_object.name end |
#site_url ⇒ Object
returns external web address for the institution
31 32 33 |
# File 'lib/flickr_mocks/models/commons_institution.rb', line 31 def site_url get_url(:site) end |