Module: BamHelpers

Included in:
Bam::Deployment
Defined in:
lib/bam_helpers.rb

Instance Method Summary collapse

Instance Method Details

#borderObject



7
8
9
# File 'lib/bam_helpers.rb', line 7

def border
  "="*col_width
end

#col_widthObject

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