Class: Amida::Label

Inherits:
Object
  • Object
show all
Defined in:
lib/amida/label.rb

Instance Method Summary collapse

Constructor Details

#initialize(width) ⇒ Label

Returns a new instance of Label.

Raises:

  • (ArgumentError)


3
4
5
6
# File 'lib/amida/label.rb', line 3

def initialize(width)
  raise ArgumentError, "Width of Amida has to be 26 and under" if width > 26
  @content = ('A'..'Z').to_a[0..width-1]
end

Instance Method Details

#renderObject



8
9
10
# File 'lib/amida/label.rb', line 8

def render
  puts to_s
end