Class: Confluence::Page::DetailsCollection
- Inherits:
-
Hash
- Object
- Hash
- Confluence::Page::DetailsCollection
- Defined in:
- lib/confluence/page.rb
Instance Method Summary (collapse)
- - (Object) [](key)
-
- (DetailsCollection) initialize(content)
constructor
A new instance of DetailsCollection.
- - (Object) to_s
Constructor Details
- (DetailsCollection) initialize(content)
A new instance of DetailsCollection
46 47 48 49 50 51 52 53 |
# File 'lib/confluence/page.rb', line 46 def initialize(content) if content content.gsub!(Details::REGEXP) do |content| self[$1.to_sym] = Details.new(:content => content) "" end end end |
Instance Method Details
- (Object) [](key)
55 56 57 |
# File 'lib/confluence/page.rb', line 55 def [](key) super(key) or self[key] = Details.new(:label => key) end |
- (Object) to_s
59 60 61 |
# File 'lib/confluence/page.rb', line 59 def to_s values.join("\n") end |