Class: String
- Inherits:
-
Object
- Object
- String
- Includes:
- StringHelper, StringNumericHelper
- Defined in:
- lib/rubyhelper/string.rb,
lib/rubyhelper/string_numeric.rb,
lib/rubyhelper/string_numeric.rb
Instance Method Summary collapse
- #+(p) ⇒ Object
-
#old_add ⇒ Object
Add the possibility to add a String with a Fixnum It will change the fixnum into a string If the argument is not a Fixnum, it will use the normal + operation.
Methods included from StringHelper
#^, #false?, #p, #p!, #scapitalize, #scapitalize!, #sha2, #sha2!, #splity, #splity!, #static, #static!, #to_ascii, #to_case, #to_case!, #to_plain, #to_plain!, #to_t, #true?, #utf8, #utf8!
Methods included from StringNumericHelper
#get_1float, #get_1float!, #get_1floats, #get_1int, #get_1int!, #get_1ints, #get_float, #get_float!, #get_floats, #get_int, #get_int!, #get_ints, #ha2m2, #to_fi, #to_ii
Instance Method Details
#+(p) ⇒ Object
178 179 180 181 |
# File 'lib/rubyhelper/string_numeric.rb', line 178 def +(p) return self + p.to_s if p.is_a? Fixnum return self.old_add(p) end |
#old_add ⇒ Object
Add the possibility to add a String with a Fixnum It will change the fixnum into a string If the argument is not a Fixnum, it will use the normal + operation
177 |
# File 'lib/rubyhelper/string_numeric.rb', line 177 alias_method :old_add, :+ |