Sha256: 242bdc0f2270b7a3af78e21cf3949dea398b0e1b773544b9705b0697decdf382
Contents?: true
Size: 704 Bytes
Versions: 1
Compression:
Stored size: 704 Bytes
Contents
module Rulz module Conditions module Boolean def self.load_conditions(reciever, attr) reciever.class_eval do define_rulz do attribute attr do condition "true" do send(attr) end condition "false" do opposite_of "true" end end end end end def self.included(base) base.class_eval do define_rulz do condition "true" do it end condition "false" do opposite_of "true" end end end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rulz-1.0.3 | lib/rulz/conditions/boolean.rb |