module Playbook::FlexWrap
def flex_wrap_props
def flex_wrap_props selected_props = flex_wrap_options.keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| flex_wrap_value = send(k) if flex_wrap_value.is_a?(Hash) flex_wrap_value.map do |media_size, wrap_value| "flex_wrap_#{media_size}_#{wrap_value.underscore}" if flex_wrap_values.include? wrap_value end else "flex_wrap_#{flex_wrap_value}" if flex_wrap_values.include? flex_wrap_value end end.compact.join(" ") end