Class: LcpRuby::Dsl::KanbanBuilder
- Inherits:
-
Object
- Object
- LcpRuby::Dsl::KanbanBuilder
- Defined in:
- lib/lcp_ruby/dsl/presenter_builder.rb
Overview
Kanban-layout-specific configuration. Card zone keys live in the sibling ‘card { … }` block (CardBuilder). See docs/design/kanban_view.md.
Instance Method Summary collapse
- #cards_per_column(value) ⇒ Object
- #column_order(*values) ⇒ Object
- #group_by(name) ⇒ Object
-
#initialize ⇒ KanbanBuilder
constructor
A new instance of KanbanBuilder.
-
#provider(class_or_string) ⇒ Object
Accepts a Class (autoload-safe) or a String.
- #show_null_column(value = true) ⇒ Object
- #to_hash ⇒ Object
- #within_column_order(expression) ⇒ Object
Constructor Details
#initialize ⇒ KanbanBuilder
Returns a new instance of KanbanBuilder.
671 672 673 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 671 def initialize @hash = {} end |
Instance Method Details
#cards_per_column(value) ⇒ Object
689 690 691 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 689 def cards_per_column(value) @hash["cards_per_column"] = value end |
#column_order(*values) ⇒ Object
685 686 687 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 685 def column_order(*values) @hash["column_order"] = values.flatten.map { |v| v.is_a?(Symbol) ? v.to_s : v } end |
#group_by(name) ⇒ Object
681 682 683 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 681 def group_by(name) @hash["group_by"] = name.to_s end |
#provider(class_or_string) ⇒ Object
Accepts a Class (autoload-safe) or a String. Stores the class name; the validator and controller resolve via safe_constantize at boot/request time.
677 678 679 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 677 def provider(class_or_string) @hash["provider"] = class_or_string.is_a?(String) ? class_or_string : class_or_string.name end |
#show_null_column(value = true) ⇒ Object
697 698 699 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 697 def show_null_column(value = true) @hash["show_null_column"] = value end |
#to_hash ⇒ Object
701 702 703 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 701 def to_hash @hash.dup end |
#within_column_order(expression) ⇒ Object
693 694 695 |
# File 'lib/lcp_ruby/dsl/presenter_builder.rb', line 693 def within_column_order(expression) @hash["within_column_order"] = expression.to_s end |