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

Inherits:
Object
  • Object
show all
Includes:
Phlex::Helpers, Field::Common::Tokens, 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.



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

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.



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

def key
  @key
end

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

#parentObject (readonly)

Returns the value of attribute parent.



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

def parent
  @parent
end

Instance Method Details

#dom_idObject



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

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