Sha256: a647c320725b3a87bfe8706a9b1cb9fd9283a30f16ed48f7f799aa210592f7a9
Contents?: true
Size: 453 Bytes
Versions: 2
Compression:
Stored size: 453 Bytes
Contents
# If you prefer getting back OpenStructs instead of Hashes, # then require 'googleajax/as_open_struct' *instead* of 'googleajax' # These OpenStruct will also have the [] and []= operators defined require 'ostruct' require 'googleajax/filters' module GoogleAjax class Base < ::OpenStruct include Filters::Default def [](key) send(key) end def []=(key, value) send("#{key}=", value) end end end require 'googleajax'
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
googleajax-1.0.1 | lib/googleajax/as_open_struct.rb |
googleajax-1.0.0 | lib/googleajax/as_open_struct.rb |