module DataFilter::FilterSet::DSL::ClassMethods
Public Instance Methods
create(&block)
click to toggle source
Initializes a new {DataFilter::FilterSet} using a block. The block conforms to the DSL
defined in this method. Delegates undefined messages to the caller's scope.
@yield the DSL
block @return [DataFilter::FilterSet] the filter set evaluated
with the DSL
# File lib/data_filter/filter_set.rb, line 80 def create(&block) original_self = eval 'self', block.binding instance = new instance.instance_variable_set(:@original_self, original_self) instance.instance_eval &block instance end