Class: DatashiftJourney::ReviewDataSection
- Inherits:
-
Object
- Object
- DatashiftJourney::ReviewDataSection
- Defined in:
- app/models/datashift_journey/review_data_section.rb
Instance Attribute Summary collapse
-
#heading ⇒ Object
Returns the value of attribute heading.
-
#rows ⇒ Object
Returns the value of attribute rows.
Instance Method Summary collapse
-
#add(title, data, link_state, link_title) ⇒ Object
Add a new row to this Section.
-
#initialize(heading) ⇒ ReviewDataSection
constructor
A new instance of ReviewDataSection.
Constructor Details
#initialize(heading) ⇒ ReviewDataSection
Returns a new instance of ReviewDataSection.
18 19 20 21 |
# File 'app/models/datashift_journey/review_data_section.rb', line 18 def initialize(heading) @heading = heading @rows = [] end |
Instance Attribute Details
#heading ⇒ Object
Returns the value of attribute heading.
5 6 7 |
# File 'app/models/datashift_journey/review_data_section.rb', line 5 def heading @heading end |
#rows ⇒ Object
Returns the value of attribute rows.
6 7 8 |
# File 'app/models/datashift_journey/review_data_section.rb', line 6 def rows @rows end |
Instance Method Details
#add(title, data, link_state, link_title) ⇒ Object
Add a new row to this Section. Returns the ReviewDataRow created
24 25 26 27 |
# File 'app/models/datashift_journey/review_data_section.rb', line 24 def add(title, data, link_state, link_title) rows << Struct::ReviewDataRow.new(title, data, link_state, link_title, heading) rows.last end |