Sha256: caef532b65e1f4a0e632f20d9a4fe83fbbe0c1dbb6a67de1ee7bedb5b16dbd7a

Contents?: true

Size: 578 Bytes

Versions: 18

Compression:

Stored size: 578 Bytes

Contents

# frozen_string_literal: true

module Playbook
  module Flex
    def self.included(base)
      base.prop :flex
    end

    def flex_props
      selected_props = flex_options.keys.select { |sk| try(sk) }
      return nil unless selected_props.present?

      selected_props.map do |k|
        flex_value = send(k)
        "flex_#{flex_value}" if flex_values.include? flex_value
      end.compact.join(" ")
    end

    def flex_options
      {
        flex: "flex",
      }
    end

    def flex_values
      %w[auto initial 0 1 2 3 4 5 6 7 8 9 10 11 12 none]
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
playbook_ui-10.26.0.pre.rc1 lib/playbook/flex.rb
playbook_ui-10.26.0.pre.alpha.sticky1 lib/playbook/flex.rb
playbook_ui-10.26.0.pre.alpha.display1 lib/playbook/flex.rb
playbook_ui-10.26.0.pre.alpha3 lib/playbook/flex.rb
playbook_ui-10.25.1 lib/playbook/flex.rb
playbook_ui-10.26.0.pre.alpha1 lib/playbook/flex.rb
playbook_ui-10.25.0 lib/playbook/flex.rb
playbook_ui-10.25.0.pre.alpha3 lib/playbook/flex.rb
playbook_ui-10.25.0.pre.treeshaking1 lib/playbook/flex.rb
playbook_ui-10.24.0 lib/playbook/flex.rb
playbook_ui-10.24.0.pre.alpha1 lib/playbook/flex.rb
playbook_ui-10.23.0 lib/playbook/flex.rb
playbook_ui-10.23.0.pre.alpha2 lib/playbook/flex.rb
playbook_ui-10.23.0.pre.alpha1 lib/playbook/flex.rb
playbook_ui-10.22.1 lib/playbook/flex.rb
playbook_ui-10.22.0 lib/playbook/flex.rb
playbook_ui-10.21.1.pre.alpha1 lib/playbook/flex.rb
playbook_ui-10.21.0.pre.alpha.rg1 lib/playbook/flex.rb