Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/socialization/helpers/string.rb
Instance Method Summary collapse
Instance Method Details
#deep_const_get ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/socialization/helpers/string.rb', line 3 def deep_const_get result = nil path = self.clone.split("::") path.each do |p| result = (result || Kernel).const_get(p) end result end |
#is_integer? ⇒ Boolean
13 14 15 |
# File 'lib/socialization/helpers/string.rb', line 13 def is_integer? self.to_i.to_s == self end |