Module: Playbook::Shadow
- Included in:
- KitBase
- Defined in:
- lib/playbook/shadow.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(base) ⇒ Object
5 6 7 |
# File 'lib/playbook/shadow.rb', line 5 def self.included(base) base.prop :shadow end |
Instance Method Details
#shadow_options ⇒ Object
19 20 21 22 23 |
# File 'lib/playbook/shadow.rb', line 19 def { shadow: "shadow", } end |
#shadow_props ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/playbook/shadow.rb', line 9 def shadow_props selected_props = .keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| shadow_value = send(k) "shadow_#{shadow_value}" if shadow_values.include? shadow_value end.compact.join(" ") end |
#shadow_values ⇒ Object
25 26 27 |
# File 'lib/playbook/shadow.rb', line 25 def shadow_values %w[none deep deeper deepest] end |