Class: Krill::Line

Inherits:
Object
  • Object
show all
Defined in:
lib/krill/line.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text, width) ⇒ Line

Returns a new instance of Line.



5
6
7
8
# File 'lib/krill/line.rb', line 5

def initialize(text, width)
  @text = text
  @width = width
end

Instance Attribute Details

#textObject (readonly) Also known as: to_s, to_str

Returns the value of attribute text.



3
4
5
# File 'lib/krill/line.rb', line 3

def text
  @text
end

#widthObject (readonly)

Returns the value of attribute width.



3
4
5
# File 'lib/krill/line.rb', line 3

def width
  @width
end