Sha256: 7bb761c8109b41b9d99a76830a09185005e06c6e8c8f617d25237ce754e6250e

Contents?: true

Size: 900 Bytes

Versions: 15

Compression:

Stored size: 900 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module PbLayout
    class Body < Playbook::PbKit::Base
      PROPS = %i[configured_classname
                 configured_data
                 configured_id
                 block].freeze

      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

      def yield(context:)
        context.capture(&block)
      end

      def to_partial_path
        "pb_layout/body"
      end

    private

      DEFAULT = Object.new
      private_constant :DEFAULT
      def default_configuration
        DEFAULT
      end
      attr_accessor(*PROPS)
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
playbook_ui-2.9.6 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.9.5 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.9.4 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.9.3 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.9.2 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.9.1 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.9.0 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.9 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.8 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.7 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.6 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.5 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.4 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.3 app/pb_kits/playbook/pb_layout/body.rb
playbook_ui-2.8.1 app/pb_kits/playbook/pb_layout/body.rb