Class: AdminModule::Pages::WorkflowDetailPage::WorkflowEvent
- Inherits:
-
Object
- Object
- AdminModule::Pages::WorkflowDetailPage::WorkflowEvent
- Defined in:
- lib/admin_module/pages/workflow_detail_page.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
readonly
Returns the value of attribute event.
-
#guideline ⇒ Object
readonly
Returns the value of attribute guideline.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
- #get_selected_option(elem) ⇒ Object
-
#initialize(cells) ⇒ WorkflowEvent
constructor
A new instance of WorkflowEvent.
Constructor Details
#initialize(cells) ⇒ WorkflowEvent
Returns a new instance of WorkflowEvent.
180 181 182 183 184 |
# File 'lib/admin_module/pages/workflow_detail_page.rb', line 180 def initialize(cells) @event = cells[0].text.strip @guideline = get_selected_option(cells[1].css('select')) @id = cells[1].css('select').attribute('id').value end |
Instance Attribute Details
#event ⇒ Object (readonly)
Returns the value of attribute event.
177 178 179 |
# File 'lib/admin_module/pages/workflow_detail_page.rb', line 177 def event @event end |
#guideline ⇒ Object (readonly)
Returns the value of attribute guideline.
176 177 178 |
# File 'lib/admin_module/pages/workflow_detail_page.rb', line 176 def guideline @guideline end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
178 179 180 |
# File 'lib/admin_module/pages/workflow_detail_page.rb', line 178 def id @id end |
Instance Method Details
#get_selected_option(elem) ⇒ Object
186 187 188 189 190 191 192 |
# File 'lib/admin_module/pages/workflow_detail_page.rb', line 186 def get_selected_option elem elem.children.each do |c| if c.attributes.has_key? 'selected' return c.text end end end |