Class: String

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

Overview

:nodoc:

Direct Known Subclasses

Atom::Content::Base

Instance Method Summary collapse

Instance Method Details

#constantizeObject



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

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

#demodulizeObject



23
24
25
# File 'lib/atom/xml/parser.rb', line 23

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