Sha256: c63d44de597ae23b3fd1929f2dacf5c336716f6ea3a04d5c00eeff9fbe8dc281

Contents?: true

Size: 420 Bytes

Versions: 5

Compression:

Stored size: 420 Bytes

Contents

module PagSeguro
  class Response < Hashie::Mash
    protected

    def convert_key(key)
      key.to_s.underscore
    end

    def convert_value(val, duping = false)
      obj = super
      obj = self.class.new(obj) if Hashie::Mash == obj
      obj
    end

    def initializing_reader(key)
      ck = convert_key(key)
      regular_writer(ck, self.class.new) unless key?(ck)
      regular_reader(ck)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
pagseguro_next-0.4.0 lib/pagseguro/response.rb
pagseguro_next-0.3.0 lib/pagseguro/response.rb
pagseguro_next-0.2.0 lib/pagseguro/response.rb
pagseguro_next-0.1.1 lib/pagseguro/response.rb
pagseguro_next-0.1.0 lib/pagseguro/response.rb