Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/trackman/utility/core_extensions.rb
Instance Method Summary collapse
Instance Method Details
#embedded? ⇒ Boolean
14 15 16 |
# File 'lib/trackman/utility/core_extensions.rb', line 14 def self.include? 'data:' end |
#internal_path? ⇒ Boolean
11 12 13 |
# File 'lib/trackman/utility/core_extensions.rb', line 11 def internal_path? self !~ /^http/ end |
#trackman_underscore ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/trackman/utility/core_extensions.rb', line 3 def trackman_underscore word = dup word.gsub!(/([A-Z\d]+)([A-Z][a-z])/,'\1_\2') word.gsub!(/([a-z\d])([A-Z])/,'\1_\2') word.tr!("-", "_") word.downcase! word end |