class Megingiard::CenteredNode
A node with centered content
Public Class Methods
new(width, text)
click to toggle source
# File lib/megingiard/centered_node.rb, line 4 def initialize(width, text) @width = width @text = text end
Public Instance Methods
to_s()
click to toggle source
# File lib/megingiard/centered_node.rb, line 9 def to_s @text.to_s.center(@width) end