Class: MetadataPresenter::RowNumber
- Inherits:
-
Object
- Object
- MetadataPresenter::RowNumber
- Defined in:
- app/models/metadata_presenter/row_number.rb
Constant Summary collapse
- ROW_ZERO =
0
Instance Method Summary collapse
-
#initialize(uuid:, route:, current_row:, coordinates:, service:) ⇒ RowNumber
constructor
A new instance of RowNumber.
- #number ⇒ Object
Constructor Details
#initialize(uuid:, route:, current_row:, coordinates:, service:) ⇒ RowNumber
Returns a new instance of RowNumber.
3 4 5 6 7 8 9 |
# File 'app/models/metadata_presenter/row_number.rb', line 3 def initialize(uuid:, route:, current_row:, coordinates:, service:) @uuid = uuid @route = route @current_row = current_row @coordinates = coordinates @service = service end |
Instance Method Details
#number ⇒ Object
13 14 15 16 17 18 19 |
# File 'app/models/metadata_presenter/row_number.rb', line 13 def number if service.flow_object(uuid).branch? coordinates.set_branch_spacers_row(uuid, calculated_row) end calculated_row end |