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.



674
675
676
677
678
# File 'lib/flickr/base.rb', line 674

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

Instance Attribute Details

#countObject (readonly)

Returns the value of attribute count.



673
674
675
# File 'lib/flickr/base.rb', line 673

def count
  @count
end

#fromdateObject (readonly)

Returns the value of attribute fromdate.



673
674
675
# File 'lib/flickr/base.rb', line 673

def fromdate
  @fromdate
end

#todateObject (readonly)

Returns the value of attribute todate.



673
674
675
# File 'lib/flickr/base.rb', line 673

def todate
  @todate
end

Class Method Details

.from_xml(xml) ⇒ Object



680
681
682
683
684
685
# File 'lib/flickr/base.rb', line 680

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