Class: Goauth2::ArrayResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/goauth2/array_response.rb

Instance Method Summary collapse

Constructor Details

#initialize(response_array) ⇒ ArrayResponse

Returns a new instance of ArrayResponse.



4
5
6
# File 'lib/goauth2/array_response.rb', line 4

def initialize(response_array)
  @array = response_array
end

Instance Method Details

#eachObject



8
9
10
11
12
# File 'lib/goauth2/array_response.rb', line 8

def each
  @array.each do |val|
    yield(wrap(val))
  end
end

#firstObject



14
15
16
# File 'lib/goauth2/array_response.rb', line 14

def first
  wrap(@array.first)
end

#lengthObject



22
23
24
# File 'lib/goauth2/array_response.rb', line 22

def length
  @array.length
end

#sizeObject



18
19
20
# File 'lib/goauth2/array_response.rb', line 18

def size
  @array.size
end