Sha256: c454ff59511ea50e1638d2cd8591e1d2c4f2d67891c4dcd594ded2de30cc8aa3
Contents?: true
Size: 258 Bytes
Versions: 3
Compression:
Stored size: 258 Bytes
Contents
require 'ostruct' module Support class QueryStruct < OpenStruct def method_missing(name, *arguments, &block) return super unless name.to_s =~ /^(?<name>.+)\?$/ !!super(Regexp.last_match(:name).to_sym, *arguments, &block) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
rail-0.1.1 | lib/support/query_struct.rb |
rail-0.1.0 | lib/support/query_struct.rb |
rail-0.0.8 | lib/support/query_struct.rb |