Class: LovelyRufus::Wrap

Inherits:
Struct
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/lovely_rufus/wrap.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(text = '', width: 72) ⇒ Wrap

Returns a new instance of Wrap.



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

def initialize(text = '', width: 72)
  super text, width
end

Instance Attribute Details

#textObject

Returns the value of attribute text

Returns:

  • (Object)

    the current value of text



4
5
6
# File 'lib/lovely_rufus/wrap.rb', line 4

def text
  @text
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



4
5
6
# File 'lib/lovely_rufus/wrap.rb', line 4

def width
  @width
end