Class: Confluence::Page::DetailsCollection

Inherits:
Hash
  • Object
show all
Defined in:
lib/confluence/page.rb

Instance Method Summary (collapse)

Constructor Details

- (DetailsCollection) initialize(content)



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