Class: Flickr::Count

Inherits:
Object
  • Object
show all
Defined in:
lib/flickr/base.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count, fromdate, todate) ⇒ Count

Returns a new instance of Count.



657
658
659
660
661
# File 'lib/flickr/base.rb', line 657

def initialize(count,fromdate,todate)
	@count = count
	@fromdate = fromdate
	@todate = todate
end

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



656
657
658
# File 'lib/flickr/base.rb', line 656

def count
  @count
end

#fromdateObject (readonly)

Returns the value of attribute fromdate.



656
657
658
# File 'lib/flickr/base.rb', line 656

def fromdate
  @fromdate
end

#todateObject (readonly)

Returns the value of attribute todate.



656
657
658
# File 'lib/flickr/base.rb', line 656

def todate
  @todate
end

Class Method Details

.from_xml(xml) ⇒ Object



663
664
665
666
667
668
# File 'lib/flickr/base.rb', line 663

def self.from_xml(xml)
	att = xml.attributes
	return Flickr::Count.new(att['count'].to_i,
			Time.at(att['fromdate'].to_i),
			Time.at(att['todate'].to_i))
end