Module: Tramway::Core::Concerns::TableBuilder

Included in:
ApplicationDecorator
Defined in:
app/decorators/tramway/core/concerns/table_builder.rb

Instance Method Summary collapse

Instance Method Details

#table(**options, &block) ⇒ Object



4
5
6
7
8
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 4

def table(**options, &block)
  (:table, class: 'table table-bordered table-striped', **options) do
    yield if block
  end
end

#td(**options, &block) ⇒ Object



22
23
24
25
26
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 22

def td(**options, &block)
  (:td, **options) do
    yield if block
  end
end

#th(**options, &block) ⇒ Object



16
17
18
19
20
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 16

def th(**options, &block)
  (:th, **options) do
    yield if block
  end
end

#thead(**options, &block) ⇒ Object



10
11
12
13
14
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 10

def thead(**options, &block)
  (:thead, **options) do
    yield if block
  end
end

#tr(**options, &block) ⇒ Object



28
29
30
31
32
# File 'app/decorators/tramway/core/concerns/table_builder.rb', line 28

def tr(**options, &block)
  (:tr, **options) do
    yield if block
  end
end