Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/t/core_ext/string.rb

Instance Method Summary collapse

Instance Method Details

#old_to_iObject



10
# File 'lib/t/core_ext/string.rb', line 10

alias old_to_i to_i

#prepend_atObject



2
3
4
# File 'lib/t/core_ext/string.rb', line 2

def prepend_at
  "@#{self}"
end

#strip_atsObject



6
7
8
# File 'lib/t/core_ext/string.rb', line 6

def strip_ats
  tr("@", "")
end

#to_i(base = 10) ⇒ Object



12
13
14
# File 'lib/t/core_ext/string.rb', line 12

def to_i(base = 10)
  tr(",", "").old_to_i(base)
end