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)



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

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

  ops.each do |op|
    class_eval("def \#{op}(*args, &block)\ncopy(:value => value.\#{op}(*args, &block))\nend\n", file, line.to_i - 1)
  end
end