Class: Phlexi::Table::Components::Base
- Inherits:
-
Object
- Object
- Phlexi::Table::Components::Base
- Includes:
- Phlex::Helpers, HTML::Behaviour
- Defined in:
- lib/phlexi/table/components/base.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
- #dom_id ⇒ Object
-
#initialize(key, parent, **options) ⇒ Base
constructor
A new instance of Base.
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, **) @key = key @parent = parent @options = build_attributes end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
10 11 12 |
# File 'lib/phlexi/table/components/base.rb', line 10 def key @key end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
10 11 12 |
# File 'lib/phlexi/table/components/base.rb', line 10 def @options end |
#parent ⇒ Object (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_id ⇒ Object
22 23 24 |
# File 'lib/phlexi/table/components/base.rb', line 22 def dom_id "#{parent.dom_id}_#{key}" end |