Class: Playbook::PbLayout::Body
- Inherits:
-
Playbook::PbKit::Base
- Object
- Playbook::PbKit::Base
- Playbook::PbLayout::Body
- Defined in:
- app/pb_kits/playbook/pb_layout/body.rb
Constant Summary collapse
- PROPS =
%i[configured_classname configured_data configured_id block].freeze
Instance Method Summary collapse
-
#initialize(classname: default_configuration, data: default_configuration, id: default_configuration, &block) ⇒ Body
constructor
A new instance of Body.
- #to_partial_path ⇒ Object
- #yield(context:) ⇒ Object
Methods inherited from Playbook::PbKit::Base
#adjusted_value, #aria, #classname, #concat_value, #data, #default_value, #false_value, #id, #is_boolean?, #is_integer?, #is_set?, #is_string?, #is_true?, #merge_value, #one_of?, #one_of_value, #true_value
Constructor Details
#initialize(classname: default_configuration, data: default_configuration, id: default_configuration, &block) ⇒ Body
Returns a new instance of Body.
11 12 13 14 15 16 17 18 19 |
# File 'app/pb_kits/playbook/pb_layout/body.rb', line 11 def initialize(classname: default_configuration, data: default_configuration, id: default_configuration, &block) self.configured_classname = classname self.configured_data = data self.configured_id = id self.block = block_given? ? block : nil end |
Instance Method Details
#to_partial_path ⇒ Object
25 26 27 |
# File 'app/pb_kits/playbook/pb_layout/body.rb', line 25 def to_partial_path "pb_layout/body" end |
#yield(context:) ⇒ Object
21 22 23 |
# File 'app/pb_kits/playbook/pb_layout/body.rb', line 21 def yield(context:) context.capture(&block) end |