Class: Flickr::Photo

Inherits:
Base
  • Object
show all
Defined in:
lib/flickrrb.rb

Instance Attribute Summary

Attributes inherited from Base

#id

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Photo

Returns a new instance of Photo.



146
147
148
149
150
# File 'lib/flickrrb.rb', line 146

def initialize data
  super
  @owner = Person.new(data['owner']) if data['owner'].class == Hash
  @tags = data['tags']['tag'].collect {|t| t['raw']} unless data['tags'].nil?
end