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)



114
115
116
117
118
119
120
121
122
123
124
# File 'lib/stupidedi/versions/functional_groups/005010/element_types/operators.rb', line 114

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