Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/atom/xml/parser.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#constantize ⇒ Object
27 28 29 |
# File 'lib/atom/xml/parser.rb', line 27 def constantize Object.module_eval("::#{self}", __FILE__, __LINE__) end |
#demodulize ⇒ Object
23 24 25 |
# File 'lib/atom/xml/parser.rb', line 23 def demodulize self.sub(/.*::/, '') end |
#singularize ⇒ Object
15 16 17 18 19 20 21 |
# File 'lib/atom/xml/parser.rb', line 15 def singularize if self =~ /ies$/ self.sub(/ies$/, 'y') else self.sub(/s$/, '') end end |