Class: Amida::Label
- Inherits:
-
Object
- Object
- Amida::Label
- Defined in:
- lib/amida/label.rb
Instance Method Summary collapse
-
#initialize(width) ⇒ Label
constructor
A new instance of Label.
- #render ⇒ Object
Constructor Details
#initialize(width) ⇒ Label
Returns a new instance of Label.
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
#render ⇒ Object
8 9 10 |
# File 'lib/amida/label.rb', line 8 def render puts to_s end |