Class: Computering::Dsl::Headline

Inherits:
Text
  • Object
show all
Defined in:
lib/computering/dsl/headline.rb

Instance Method Summary collapse

Methods inherited from Text

#[], #blank?, #buffer, #execute, from_text

Constructor Details

#initialize(text) ⇒ Headline

Returns a new instance of Headline.



3
4
5
6
# File 'lib/computering/dsl/headline.rb', line 3

def initialize(text)
  @text   = text.background(:red)
  @buffer = "#{'=' * text.size}\n\n".foreground(:red)
end