Module: SexySettings::Printable
- Included in:
- Base
- Defined in:
- lib/sexy_settings/printable.rb
Overview
This module holds print methods
Instance Method Summary collapse
Instance Method Details
#as_formatted_text(which = :all) ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 |
# File 'lib/sexy_settings/printable.rb', line 5 def as_formatted_text(which = :all) props_list = property_list(which) max_key_size = props_list.map { |el| el.first.to_s.size }.max [ sharp_line(which), title(which), sharp_line(which), '', formatted_properties(props_list, max_key_size), '' ].join("\n") end |