Module: Stupidedi::Versions::Common::ElementTypes::Operators::Wrappers

Included in:
DateVal::Proper, IdentifierVal::Valid, StringVal::Valid
Defined in:
lib/stupidedi/versions/common/element_types/operators.rb

Instance Method Summary collapse

Instance Method Details

#wrappers(*ops)



112
113
114
115
116
117
118
119
120
121
122
# File 'lib/stupidedi/versions/common/element_types/operators.rb', line 112

def wrappers(*ops)
  file, line, = Stupidedi.caller

  ops.each do |op|
    class_eval(<<-RUBY, file, line.to_i - 1)
      def #{op}(*args, &block)
        copy(:value => value.#{op}(*args, &block))
      end
    RUBY
  end
end