Class: ConfluenceHelper::WikiPage
- Inherits:
-
Confluence
- Object
- Confluence
- ConfluenceHelper::WikiPage
- Defined in:
- lib/confluence_helper.rb
Instance Method Summary collapse
- #attachment(title) ⇒ Object
-
#initialize(spacekey, title) ⇒ WikiPage
constructor
A new instance of WikiPage.
- #to_nodes(mode = :text) ⇒ Object
Methods inherited from Confluence
#deliverables_pages, #find_url_by_title_and_space, #get_labels_for_each_child_page, #save_page_attachment
Constructor Details
#initialize(spacekey, title) ⇒ WikiPage
Returns a new instance of WikiPage.
168 169 170 |
# File 'lib/confluence_helper.rb', line 168 def initialize(spacekey, title) @spacekey, @title = spacekey, title end |
Instance Method Details
#attachment(title) ⇒ Object
176 177 178 179 180 181 182 |
# File 'lib/confluence_helper.rb', line 176 def (title) page = query_rest_api( url , {expand:"children.attachment"}) results = page.body["children"]["attachment"]["results"] result = results.find{|x| x["title"] == title} = "#{ENVied.CONSTASH_URL}#{result["_links"]["download"]}" query_rest_api(, = {}).body end |
#to_nodes(mode = :text) ⇒ Object
172 173 174 |
# File 'lib/confluence_helper.rb', line 172 def to_nodes(mode=:text) parse_wiki_table(doc, mode) end |