Class: ConfluenceHelper::Confluence::DeliverablePage
- Inherits:
-
Object
- Object
- ConfluenceHelper::Confluence::DeliverablePage
- Defined in:
- lib/confluence_helper.rb
Instance Method Summary collapse
- #deliverables ⇒ Object
-
#initialize(labels:, body:) ⇒ DeliverablePage
constructor
A new instance of DeliverablePage.
-
#is_deliverables_table?(table) ⇒ Boolean
Name DHFR Status Location Comments.
- #tables ⇒ Object
Constructor Details
#initialize(labels:, body:) ⇒ DeliverablePage
Returns a new instance of DeliverablePage.
77 78 79 |
# File 'lib/confluence_helper.rb', line 77 def initialize(labels:, body:) @node = Nokogiri::HTML(body) end |
Instance Method Details
#deliverables ⇒ Object
85 86 87 |
# File 'lib/confluence_helper.rb', line 85 def deliverables tables.select{|t| is_deliverables_table? t } .map{|table| table.data }.flatten end |
#is_deliverables_table?(table) ⇒ Boolean
Name DHFR Status Location Comments
90 91 92 |
# File 'lib/confluence_helper.rb', line 90 def is_deliverables_table?(table) table.has_columns? columns: %w{Name DHFR Status Location Comments} end |