Module: AppRail::Steps::Grid::Grid

Included in:
Displayable
Defined in:
lib/app_rail/steps/grid/grid.rb

Instance Method Summary collapse

Instance Method Details

#ar_styled_content_grid_item(text:, id: self.id, detail_text: nil, preview_url: nil) ⇒ Object



21
22
23
24
25
26
# File 'lib/app_rail/steps/grid/grid.rb', line 21

def ar_styled_content_grid_item(text:, id: self.id, detail_text: nil, preview_url: nil)
  raise "Missing id" if id.nil?
  raise "Missing text" if text.nil?

  { id: id, text: text, type: :item, detailText: detail_text, imageURL: preview_url }.compact
end

#ar_styled_content_grid_large_section(id:, text:) ⇒ Object



7
8
9
10
11
12
# File 'lib/app_rail/steps/grid/grid.rb', line 7

def ar_styled_content_grid_large_section(id:, text:)
  raise "Missing id" if id.nil?
  raise "Missing text" if text.nil?

  { id: id, text: text, type: :largeSection }
end

#ar_styled_content_grid_small_section(id:, text:) ⇒ Object



14
15
16
17
18
19
# File 'lib/app_rail/steps/grid/grid.rb', line 14

def ar_styled_content_grid_small_section(id:, text:)
  raise "Missing id" if id.nil?
  raise "Missing text" if text.nil?

  { id: id, text: text, type: :smallSection }
end