Class: Phlexi::Table::Components::Base

Inherits:
Object
  • Object
show all
Includes:
Phlex::Helpers, HTML::Behaviour
Defined in:
lib/phlexi/table/components/base.rb

Direct Known Subclasses

ActionsColumn, Column, ColumnGroup

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(key, parent, **options) ⇒ Base

Returns a new instance of Base.



14
15
16
17
18
19
20
# File 'lib/phlexi/table/components/base.rb', line 14

def initialize(key, parent, **options)
  @key = key
  @parent = parent
  @options = options

  build_attributes
end

Instance Attribute Details

#keyObject (readonly)

Returns the value of attribute key.



10
11
12
# File 'lib/phlexi/table/components/base.rb', line 10

def key
  @key
end

#optionsObject (readonly)

Returns the value of attribute options.



10
11
12
# File 'lib/phlexi/table/components/base.rb', line 10

def options
  @options
end

#parentObject (readonly)

Returns the value of attribute parent.



10
11
12
# File 'lib/phlexi/table/components/base.rb', line 10

def parent
  @parent
end

Instance Method Details

#dom_idObject



22
23
24
# File 'lib/phlexi/table/components/base.rb', line 22

def dom_id
  "#{parent.dom_id}_#{key}"
end