Class: GpWebpay::WebServices::Response

Inherits:
Object
  • Object
show all
Defined in:
lib/gp_webpay/web_services/response.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(data) ⇒ Response

Returns a new instance of Response.



6
7
8
9
10
11
12
13
14
15
# File 'lib/gp_webpay/web_services/response.rb', line 6

def initialize(data)
  @plain = data

  return unless data.respond_to?(:keys)
  data.keys.each do |key|
    define_singleton_method key.underscore do
      data[key]
    end
  end
end

Instance Attribute Details

#plainObject

Returns the value of attribute plain.



4
5
6
# File 'lib/gp_webpay/web_services/response.rb', line 4

def plain
  @plain
end