Class: GoogleOAuth::ArrayResponse
- Inherits:
-
Object
- Object
- GoogleOAuth::ArrayResponse
- Defined in:
- lib/google_oauth/array_response.rb
Instance Method Summary collapse
- #each ⇒ Object
- #first ⇒ Object
-
#initialize(response_array) ⇒ ArrayResponse
constructor
A new instance of ArrayResponse.
- #length ⇒ Object
- #size ⇒ Object
Constructor Details
#initialize(response_array) ⇒ ArrayResponse
Returns a new instance of ArrayResponse.
4 5 6 |
# File 'lib/google_oauth/array_response.rb', line 4 def initialize(response_array) @array = response_array end |
Instance Method Details
#each ⇒ Object
8 9 10 11 12 |
# File 'lib/google_oauth/array_response.rb', line 8 def each @array.each do |val| yield(wrap(val)) end end |
#first ⇒ Object
14 15 16 |
# File 'lib/google_oauth/array_response.rb', line 14 def first wrap(@array.first) end |
#length ⇒ Object
22 23 24 |
# File 'lib/google_oauth/array_response.rb', line 22 def length @array.length end |
#size ⇒ Object
18 19 20 |
# File 'lib/google_oauth/array_response.rb', line 18 def size @array.size end |