Sha256: a4567f5d5bb6150738e4e678308746e4ecfd11cec5e3d473c8c9f8d1aee9435c

Contents?: true

Size: 736 Bytes

Versions: 5

Compression:

Stored size: 736 Bytes

Contents

module Playbook
  module PbKit
    class Base
      def classname(ui_classes="")
        if configured_classname == default_configuration
          ui_classes
        else
          ui_classes+" "+configured_classname
        end
      end

      def data(ui_data={})
        ui_data ||= {}
        if configured_data == default_configuration
          ui_data
        else
          configured_data.merge(ui_data)
        end
      end

      def id(ui_id=nil)
        if configured_id == default_configuration
          ui_id
        else
          configured_id
        end
      end

    private

      DEFAULT = Object.new
      private_constant :DEFAULT
      def default_configuration
        DEFAULT
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
playbook_ui-2.7.2 app/pb_kits/playbook/pb_kit/base.rb
playbook_ui-2.7.1 app/pb_kits/playbook/pb_kit/base.rb
playbook_ui-2.7.0 app/pb_kits/playbook/pb_kit/base.rb
playbook_ui-2.6.0 app/pb_kits/playbook/pb_kit/base.rb
playbook_ui-2.5.0 app/pb_kits/playbook/pb_kit/base.rb