Module: Atom
- Defined in:
- lib/atom/element.rb,
lib/atom/feed.rb,
lib/atom/http.rb,
lib/atom/text.rb,
lib/atom/cache.rb,
lib/atom/entry.rb,
lib/atom/service.rb,
lib/atom/collection.rb
Overview
:nodoc:
Defined Under Namespace
Modules: AttrEl, Converters, DigestAuth, HTTPResponse, HasCategories, HasLinks, Parsers, Tools Classes: Author, AutodiscoveryFailure, Categories, Category, Collection, Content, Contributor, Control, Element, Entry, Feed, FeedGone, FileCache, HTTP, HTTPException, Link, NilCache, ParseError, Person, Rights, Service, Source, Subtitle, Summary, Text, Title, Unauthorized, Workspace, WrongMimetype
Constant Summary collapse
- TOOLS_VERSION =
'2.0.5'
- UA =
"atom-tools " + TOOLS_VERSION
- NS =
"http://www.w3.org/2005/Atom"
- PP_NS =
"http://www.w3.org/2007/app"
Class Method Summary collapse
-
.Multiple(klass) ⇒ Object
ignore the man behind the curtain.
Class Method Details
.Multiple(klass) ⇒ Object
ignore the man behind the curtain.
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/atom/element.rb', line 39 def self.Multiple klass Class.new(Array) do @class = klass def new *args item = self.class.holds.new *args self << item item end def << item raise ArgumentError, "this can only hold items of class #{self.class.holds}" unless item.is_a? self.class.holds super(item) end def self.holds; @class end def self.single?; true end def taguri; end end end |