Class: HammerCLI::Help::Text
- Inherits:
-
AbstractItem
- Object
- AbstractItem
- HammerCLI::Help::Text
- Defined in:
- lib/hammer_cli/help/definition/text.rb
Direct Known Subclasses
Constant Summary
Constants inherited from AbstractItem
Instance Attribute Summary
Attributes inherited from AbstractItem
Instance Method Summary collapse
- #build_string ⇒ Object
-
#initialize(text = nil, options = {}) ⇒ Text
constructor
A new instance of Text.
Methods inherited from AbstractItem
Constructor Details
#initialize(text = nil, options = {}) ⇒ Text
Returns a new instance of Text.
4 5 6 7 |
# File 'lib/hammer_cli/help/definition/text.rb', line 4 def initialize(text = nil, = {}) super() build_definition(text) end |
Instance Method Details
#build_string ⇒ Object
9 10 11 12 13 |
# File 'lib/hammer_cli/help/definition/text.rb', line 9 def build_string text = @text text = HighLine.color(@text, :bold) if @richtext text end |