Class: Pulse::Table::Column

Inherits:
Component
  • Object
show all
Defined in:
app/components/pulse/table/column.rb

Overview

Encapsulates table column properties

Constant Summary

Constants inherited from Component

Component::TW_MERGE

Constants included from AttributesHelper

AttributesHelper::PLURAL_ARIA_ATTRIBUTES, AttributesHelper::PLURAL_DATA_ATTRIBUTES

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Component

generate_id, #merge_attributes, #merge_classes

Methods included from SvgHelper

#render_svg

Methods included from FetchOrFallbackHelper

#fetch_or_fallback, #fetch_or_fallback_boolean

Methods included from AttributesHelper

#aria, #data, #merge_aria, #merge_data, #merge_prefixed_attribute_hashes

Constructor Details

#initialize(title: '', sr_title: nil, sort_by: nil, footer: nil, **options, &block) ⇒ Column

Returns a new instance of Column.



9
10
11
12
13
14
15
16
17
# File 'app/components/pulse/table/column.rb', line 9

def initialize(title: '', sr_title: nil, sort_by: nil, footer: nil,
               **options, &block)
  @title = title
  @sr_title = sr_title
  @sort_by = sort_by
  @footer = footer
  @block = block
  @options = options
end

Instance Attribute Details

Returns the value of attribute footer.



7
8
9
# File 'app/components/pulse/table/column.rb', line 7

def footer
  @footer
end

#optionsObject (readonly)

Returns the value of attribute options.



7
8
9
# File 'app/components/pulse/table/column.rb', line 7

def options
  @options
end

#sort_byObject (readonly)

Returns the value of attribute sort_by.



7
8
9
# File 'app/components/pulse/table/column.rb', line 7

def sort_by
  @sort_by
end

#sr_titleObject (readonly)

Returns the value of attribute sr_title.



7
8
9
# File 'app/components/pulse/table/column.rb', line 7

def sr_title
  @sr_title
end

#titleObject (readonly)

Returns the value of attribute title.



7
8
9
# File 'app/components/pulse/table/column.rb', line 7

def title
  @title
end