Module: Stupidedi::Versions::FunctionalGroups::FiftyTen::ElementTypes::Operators::Wrappers

Included in:
DateVal::Proper, IdentifierVal::Empty, IdentifierVal::NonEmpty, StringVal::Empty, StringVal::NonEmpty
Defined in:
lib/stupidedi/versions/functional_groups/005010/element_types/operators.rb

Instance Method Summary (collapse)

Instance Method Details

- wrappers(*ops)



98
99
100
101
102
103
104
105
106
107
108
# File 'lib/stupidedi/versions/functional_groups/005010/element_types/operators.rb', line 98

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.__send__(:#{op}, *args, &block))
      end
    RUBY
  end
end