Class: SoundCloud::ArrayResponseWrapper

Inherits:
Array
  • Object
show all
Defined in:
lib/soundcloud/array_response_wrapper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(response = []) ⇒ ArrayResponseWrapper

Returns a new instance of ArrayResponseWrapper


4
5
6
7
8
9
10
# File 'lib/soundcloud/array_response_wrapper.rb', line 4

def initialize(response=[])
  @response = response
  mashes = response.map do |object|
    Hashie::Mash.new(object)
  end
  replace(mashes)
end

Instance Attribute Details

#responseObject (readonly)

Returns the value of attribute response


3
4
5
# File 'lib/soundcloud/array_response_wrapper.rb', line 3

def response
  @response
end