Class: DatashiftJourney::ReviewDataSection

Inherits:
Object
  • Object
show all
Defined in:
app/models/datashift_journey/review_data_section.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#headingObject

Returns the value of attribute heading.



5
6
7
# File 'app/models/datashift_journey/review_data_section.rb', line 5

def heading
  @heading
end

#rowsObject

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