Class: AhoyCaptain::Tables::HeaderComponent

Inherits:
ViewComponent::Base
  • Object
show all
Defined in:
app/components/ahoy_captain/tables/header_component.rb

Instance Method Summary collapse

Constructor Details

#initialize(headers, options = {}) ⇒ HeaderComponent

Returns a new instance of HeaderComponent.



4
5
6
7
# File 'app/components/ahoy_captain/tables/header_component.rb', line 4

def initialize(headers, options = {})
  @headers = headers.flatten
  @options = options
end

Instance Method Details

#fixed_height?Boolean

Returns:

  • (Boolean)


9
10
11
12
13
14
15
# File 'app/components/ahoy_captain/tables/header_component.rb', line 9

def fixed_height?
  if @options.key?(:fixed_height)
    @options[:fixed_height]
  else
    true
  end
end