Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/atom/xml/parser.rb,
lib/atom/xml/parser.rb,
lib/atom/xml/parser.rb
Overview
:nodoc:
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#constantize ⇒ Object
35 36 37 |
# File 'lib/atom/xml/parser.rb', line 35 def constantize Object.module_eval("::#{self}", __FILE__, __LINE__) end |
#demodulize ⇒ Object
27 28 29 |
# File 'lib/atom/xml/parser.rb', line 27 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 |