Sha256: d5d656651ea10d0db8a61ca10c292118247c93f72095015d6bf011215b15440d
Contents?: true
Size: 397 Bytes
Versions: 1
Compression:
Stored size: 397 Bytes
Contents
module JsonapiCompliable class FilterOperators class Catchall attr_reader :procs def initialize @procs = {} end def method_missing(name, *args, &blk) @procs[name] = blk end def to_hash @procs end end def self.build(&blk) c = Catchall.new c.instance_eval(&blk) if blk c.to_hash end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jsonapi_compliable-1.0.alpha.2 | lib/jsonapi_compliable/filter_operators.rb |