Class: Fixnum
- Inherits:
-
Object
- Object
- Fixnum
- Includes:
- FixnumHelper
- Defined in:
- lib/rubyhelper/fixnum.rb,
lib/rubyhelper/fixnum.rb
Instance Method Summary collapse
- #+(p) ⇒ Object
-
#old_add ⇒ Object
Add the possibility to add a Fixnum with a String It will change the fixnum into a string If the argument is not a String, it will use the normal + operation.
Methods included from FixnumHelper
Instance Method Details
#+(p) ⇒ Object
24 25 26 27 |
# File 'lib/rubyhelper/fixnum.rb', line 24 def +(p) return self.to_s + p if p.is_a? String return self.old_add(p) end |
#old_add ⇒ Object
Add the possibility to add a Fixnum with a String It will change the fixnum into a string If the argument is not a String, it will use the normal + operation
23 |
# File 'lib/rubyhelper/fixnum.rb', line 23 alias_method :old_add, :+ |