Class: Spree::Admin::Table::Builder
- Inherits:
-
Object
- Object
- Spree::Admin::Table::Builder
- Defined in:
- app/models/spree/admin/table/builder.rb
Instance Attribute Summary collapse
-
#parent_column ⇒ Object
readonly
Returns the value of attribute parent_column.
-
#registry ⇒ Object
readonly
Returns the value of attribute registry.
Instance Method Summary collapse
-
#add(key, **options, &block) ⇒ Column
Add a column.
-
#initialize(registry, parent_column = nil) ⇒ Builder
constructor
A new instance of Builder.
-
#insert_after(target_key, new_key, **options) ⇒ Column?
Insert after another column.
-
#insert_before(target_key, new_key, **options) ⇒ Column?
Insert before another column.
-
#remove(key) ⇒ Column?
Remove a column.
-
#update(key, **options) ⇒ Column?
Update a column.
Constructor Details
#initialize(registry, parent_column = nil) ⇒ Builder
Returns a new instance of Builder.
7 8 9 10 |
# File 'app/models/spree/admin/table/builder.rb', line 7 def initialize(registry, parent_column = nil) @registry = registry @parent_column = parent_column end |
Instance Attribute Details
#parent_column ⇒ Object (readonly)
Returns the value of attribute parent_column.
5 6 7 |
# File 'app/models/spree/admin/table/builder.rb', line 5 def parent_column @parent_column end |
#registry ⇒ Object (readonly)
Returns the value of attribute registry.
5 6 7 |
# File 'app/models/spree/admin/table/builder.rb', line 5 def registry @registry end |
Instance Method Details
#add(key, **options, &block) ⇒ Column
Add a column
16 17 18 |
# File 'app/models/spree/admin/table/builder.rb', line 16 def add(key, **, &block) @registry.add(key, **, &block) end |
#insert_after(target_key, new_key, **options) ⇒ Column?
Insert after another column
49 50 51 |
# File 'app/models/spree/admin/table/builder.rb', line 49 def insert_after(target_key, new_key, **) @registry.insert_after(target_key, new_key, **) end |
#insert_before(target_key, new_key, **options) ⇒ Column?
Insert before another column
40 41 42 |
# File 'app/models/spree/admin/table/builder.rb', line 40 def insert_before(target_key, new_key, **) @registry.insert_before(target_key, new_key, **) end |
#remove(key) ⇒ Column?
Remove a column
23 24 25 |
# File 'app/models/spree/admin/table/builder.rb', line 23 def remove(key) @registry.remove(key) end |
#update(key, **options) ⇒ Column?
Update a column
31 32 33 |
# File 'app/models/spree/admin/table/builder.rb', line 31 def update(key, **) @registry.update(key, **) end |