Method: Playbook::Truncate#truncate_props
- Defined in:
- lib/playbook/truncate.rb
#truncate_props ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/playbook/truncate.rb', line 9 def truncate_props selected_props = .keys.select { |sk| try(sk) } return nil unless selected_props.present? selected_props.map do |k| truncate_value = send(k) "truncate_#{truncate_value}" if truncate_values.include? truncate_value end.compact.join(" ") end |