Sha256: 0f26b255e412a6142bbed11311358ec1a0573ce967fe6d0f443a1c72f0298953
Contents?: true
Size: 586 Bytes
Versions: 4
Compression:
Stored size: 586 Bytes
Contents
module Fix module Helper module OnHelper def on attribute, *args, &block unless instance_variable_defined? :@object raise MissingSubjectError, "Incomplete specifications. " \ "Please specify a `subject` on the top." end @defs = {} unless instance_variable_defined? :@defs @args = [] unless instance_variable_defined? :@args i = On.new @object, @defs, *(@args + [[attribute] + args]) i.instance_eval(&block) end end end end require_relative File.join '..', 'on'
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
fix-0.6.1 | lib/fix/helper/on_helper.rb |
fix-0.6.0 | lib/fix/helper/on_helper.rb |
fix-0.5.0 | lib/fix/helper/on_helper.rb |
fix-0.4.0 | lib/fix/helper/on_helper.rb |