Class: String

Inherits:
Object
  • Object
show all
Defined in:
lib/atom/xml/parser.rb,
lib/atom/xml/parser.rb,
lib/atom/xml/parser.rb

Overview

:nodoc:

Direct Known Subclasses

Atom::Content::Base

Instance Method Summary collapse

Instance Method Details

#constantizeObject


35
36
37
# File 'lib/atom/xml/parser.rb', line 35

def constantize
  Object.module_eval("::#{self}", __FILE__, __LINE__)
end

#demodulizeObject


27
28
29
# File 'lib/atom/xml/parser.rb', line 27

def demodulize
  self.sub(/.*::/, '')
end

#singularizeObject


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