Class: String
- Inherits:
-
Object
show all
- Includes:
- Inflector
- Defined in:
- lib/jun/active_support/core_ext/string/access.rb,
lib/jun/active_support/core_ext/string/inflector.rb
Constant Summary
Constants included
from Inflector
Inflector::PLURAL, Inflector::SINGULAR, Inflector::UNCHANGEABLE
Instance Method Summary
collapse
Methods included from Inflector
#camelize, included, #pluralize, #singularize, #underscore
Instance Method Details
#at(position) ⇒ Object
4
5
6
|
# File 'lib/jun/active_support/core_ext/string/access.rb', line 4
def at(position)
self[position]
end
|
#from(position) ⇒ Object
8
9
10
|
# File 'lib/jun/active_support/core_ext/string/access.rb', line 8
def from(position)
self[position, length]
end
|
#to(position) ⇒ Object
12
13
14
15
16
17
|
# File 'lib/jun/active_support/core_ext/string/access.rb', line 12
def to(position)
position += size if position.negative?
position = -1 if position.negative?
self[0, position + 1]
end
|