Module: CTIMethod::Extensions
- Included in:
- Object
- Defined in:
- lib/cti_method/extensions.rb
Instance Method Summary collapse
Instance Method Details
#cti_method(*methods) ⇒ Object
3 4 5 6 7 8 9 10 11 12 13 |
# File 'lib/cti_method/extensions.rb', line 3 def cti_method(*methods) methods.each do |method_name| define_singleton_method(method_name) do |*args| begin new.send(method_name, *args) rescue ArgumentError => e raise CTIInitializationError.new(e) end end end end |