Sha256: 27017244d88174903d2366f900cb0b86e698bfbe3f9a99d1b1f6bb3cfb20ce94

Contents?: true

Size: 384 Bytes

Versions: 23

Compression:

Stored size: 384 Bytes

Contents

$:.push 'lib'; require 'transcriber'

module Upcasing
  def self.call(keys)
    keys.map {|key| key.to_s.upcase}
  end
end

Transcriber.configure do |c|
  c.convert_input_keys = Upcasing
end

class Customer < Transcriber::Resource
  property :login
end

@root = Customer.parse({"LOGIN" => 'jackiechan2010'}).first

puts "root:     #{@root.inspect}"
puts "resource: #{@root.resource}"

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
transcriber-0.0.26 examples/properties/with_key_converter.rb
transcriber-0.0.25 examples/properties/with_key_converter.rb
transcriber-0.0.24 examples/properties/with_key_converter.rb
transcriber-0.0.23 examples/properties/with_key_converter.rb
transcriber-0.0.22 examples/properties/with_key_converter.rb
transcriber-0.0.21 examples/properties/with_key_converter.rb
transcriber-0.0.20 examples/properties/with_key_converter.rb
transcriber-0.0.19 examples/properties/with_key_converter.rb
transcriber-0.0.18 examples/properties/with_key_converter.rb
transcriber-0.0.17 examples/properties/with_key_converter.rb
transcriber-0.0.16 examples/properties/with_key_converter.rb
transcriber-0.0.15 examples/properties/with_key_converter.rb
transcriber-0.0.14 examples/properties/with_key_converter.rb
transcriber-0.0.13 examples/properties/with_key_converter.rb
transcriber-0.0.12 examples/properties/with_key_converter.rb
transcriber-0.0.11 examples/properties/with_key_converter.rb
transcriber-0.0.10 examples/properties/with_key_converter.rb
transcriber-0.0.9 examples/properties/with_key_converter.rb
transcriber-0.0.8 examples/properties/with_key_converter.rb
transcriber-0.0.7 examples/properties/with_key_converter.rb