Class: FlickRaw::ResponseList
- Inherits:
-
Response
show all
- Includes:
- Enumerable
- Defined in:
- lib/flickraw/response.rb
Instance Attribute Summary
Attributes inherited from Response
#flickr_type
Instance Method Summary
collapse
Methods inherited from Response
build, #marshal_load, #to_hash, #to_s
Constructor Details
Returns a new instance of ResponseList.
39
|
# File 'lib/flickraw/response.rb', line 39
def initialize(h, t, a); super(h, t); @a = a end
|
Instance Method Details
#[](k) ⇒ Object
40
|
# File 'lib/flickraw/response.rb', line 40
def [](k); k.is_a?(Fixnum) ? @a[k] : super(k) end
|
#each ⇒ Object
41
|
# File 'lib/flickraw/response.rb', line 41
def each; @a.each{|e| yield e} end
|
#inspect ⇒ Object
43
|
# File 'lib/flickraw/response.rb', line 43
def inspect; @a.inspect end
|
#marshal_dump ⇒ Object
45
|
# File 'lib/flickraw/response.rb', line 45
def marshal_dump; [@h, @flickr_type, @a] end
|
#size ⇒ Object
Also known as:
length
44
|
# File 'lib/flickraw/response.rb', line 44
def size; @a.size end
|
#to_a ⇒ Object
42
|
# File 'lib/flickraw/response.rb', line 42
def to_a; @a end
|