Class: Flickr::Photos::License
Instance Attribute Summary collapse
-
#id ⇒ Object
Returns the value of attribute id.
-
#name ⇒ Object
Returns the value of attribute name.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
- #==(o) ⇒ Object
- #eql?(o) ⇒ Boolean
-
#initialize(attributes) ⇒ License
constructor
create a new instance of a flickr photo license.
Constructor Details
#initialize(attributes) ⇒ License
create a new instance of a flickr photo license.
Params
-
attributes (Required)
a hash of attributes used to set the initial values of the license object
9 10 11 12 13 |
# File 'lib/flickr/license.rb', line 9 def initialize(attributes) attributes.each do |k,v| send("#{k}=", v) end end |
Instance Attribute Details
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/flickr/license.rb', line 2 def id @id end |
#name ⇒ Object
Returns the value of attribute name.
2 3 4 |
# File 'lib/flickr/license.rb', line 2 def name @name end |
#url ⇒ Object
Returns the value of attribute url.
2 3 4 |
# File 'lib/flickr/license.rb', line 2 def url @url end |
Instance Method Details
#==(o) ⇒ Object
15 16 17 18 19 |
# File 'lib/flickr/license.rb', line 15 def == o return false unless o.respond_to?(:id) && o.respond_to?(:name) && o.respond_to?(:url) return true if id == o.id && name == o.name && url == o.url false end |
#eql?(o) ⇒ Boolean
21 22 23 |
# File 'lib/flickr/license.rb', line 21 def eql? o return self == o end |