Class: Flickr::Context

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(prev_id, prev_secret, prev_title, prev_url, next_id, next_secret, next_title, next_url) ⇒ Context

Returns a new instance of Context.



595
596
597
598
599
600
601
602
603
604
605
# File 'lib/flickr/base.rb', line 595

def initialize(prev_id,prev_secret,prev_title,prev_url,
               next_id,next_secret,next_title,next_url)
	@prev_id = prev_id
	@prev_secret = prev_secret
	@prev_title = prev_title
	@prev_url = prev_url
	@next_id = next_id
	@next_secret = next_secret
	@next_title = next_title
	@next_url = next_url
end

Instance Attribute Details

#next_idObject (readonly)

Returns the value of attribute next_id.



592
593
594
# File 'lib/flickr/base.rb', line 592

def next_id
  @next_id
end

#next_secretObject (readonly)

Returns the value of attribute next_secret.



592
593
594
# File 'lib/flickr/base.rb', line 592

def next_secret
  @next_secret
end

#next_titleObject (readonly)

Returns the value of attribute next_title.



592
593
594
# File 'lib/flickr/base.rb', line 592

def next_title
  @next_title
end

#next_urlObject (readonly)

Returns the value of attribute next_url.



592
593
594
# File 'lib/flickr/base.rb', line 592

def next_url
  @next_url
end

#prev_idObject (readonly)

Returns the value of attribute prev_id.



592
593
594
# File 'lib/flickr/base.rb', line 592

def prev_id
  @prev_id
end

#prev_secretObject (readonly)

Returns the value of attribute prev_secret.



592
593
594
# File 'lib/flickr/base.rb', line 592

def prev_secret
  @prev_secret
end

#prev_titleObject (readonly)

Returns the value of attribute prev_title.



592
593
594
# File 'lib/flickr/base.rb', line 592

def prev_title
  @prev_title
end

#prev_urlObject (readonly)

Returns the value of attribute prev_url.



592
593
594
# File 'lib/flickr/base.rb', line 592

def prev_url
  @prev_url
end

Class Method Details

.from_xml(xml) ⇒ Object



607
608
609
610
611
612
613
# File 'lib/flickr/base.rb', line 607

def self.from_xml(xml)
	a0 = xml.elements['prevphoto'].attributes
	a1 = xml.elements['nextphoto'].attributes
	return Flickr::Context.new(
		a0['id'],a0['secret'],a0['title'],a0['url'],
		a1['id'],a1['secret'],a1['title'],a1['url'])
end