Module: BamHelpers
- Included in:
- Bam::Deployment
- Defined in:
- lib/bam_helpers.rb
Instance Method Summary collapse
- #border ⇒ Object
-
#col_width ⇒ Object
terminal column width.
- #wrap_borders(content) ⇒ Object
- #wrap_top(content) ⇒ Object
Instance Method Details
#border ⇒ Object
7 8 9 |
# File 'lib/bam_helpers.rb', line 7 def border "="*col_width end |
#col_width ⇒ Object
terminal column width
3 4 5 |
# File 'lib/bam_helpers.rb', line 3 def col_width `stty size`.split(" ").last.to_i end |
#wrap_borders(content) ⇒ Object
15 16 17 |
# File 'lib/bam_helpers.rb', line 15 def wrap_borders(content) "#{border}\n#{content}\n#{border}" end |
#wrap_top(content) ⇒ Object
11 12 13 |
# File 'lib/bam_helpers.rb', line 11 def wrap_top(content) "#{border}\n#{content}" end |