class ValueAdd
Public Class Methods
bestow_methods(*args)
click to toggle source
# File lib/primitive_wrapper.rb, line 447 def self.bestow_methods(*args) args = args.first if args.first.kind_of? Array args.each do |meth| define_method meth do |*args, &block| @value.send(meth, *args, &block) end end end
capture_base_methods(type, except=Object)
click to toggle source
# File lib/primitive_wrapper.rb, line 455 def self.capture_base_methods(type, except=Object) add_me = type.instance_methods - except.instance_methods - Value.instance_methods - [:singleton_method_added] bestow_methods add_me end
Public Instance Methods
valid_type(prm)
click to toggle source
# File lib/primitive_wrapper.rb, line 444 def valid_type(prm) # must override false end