Sha256: f190c6b65bfba983a8373682b62e59a6f6152eda4e365cb54a6263f7b8fccf26
Contents?: true
Size: 904 Bytes
Versions: 1038
Compression:
Stored size: 904 Bytes
Contents
# frozen_string_literal: true module Playbook module Order def self.included(base) base.prop :order end # rubocop:disable Style/IfInsideElse def order_props selected_props = order_options.keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| order_value = send(k) if order_value.is_a?(Hash) order_value.map do |media_size, order_size_value| "flex_order_#{media_size}_#{order_size_value}" if order_values.include? order_size_value.to_s end else "flex_order_#{order_value}" if order_values.include? order_value.to_s end end.compact.join(" ") end # rubocop:enable Style/IfInsideElse def order_options { order: "order", } end def order_values %w[1 2 3 4 5 6 7 8 9 10 11 12] end end end
Version data entries
1,038 entries across 1,038 versions & 1 rubygems