Class: Samovar::Output::Header
- Inherits:
-
Object
- Object
- Samovar::Output::Header
- Defined in:
- lib/samovar/output.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#object ⇒ Object
readonly
Returns the value of attribute object.
Instance Method Summary collapse
- #align(columns) ⇒ Object
-
#initialize(name, object) ⇒ Header
constructor
A new instance of Header.
Constructor Details
#initialize(name, object) ⇒ Header
Returns a new instance of Header.
27 28 29 30 |
# File 'lib/samovar/output.rb', line 27 def initialize(name, object) @name = name @object = object end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
32 33 34 |
# File 'lib/samovar/output.rb', line 32 def name @name end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
33 34 35 |
# File 'lib/samovar/output.rb', line 33 def object @object end |
Instance Method Details
#align(columns) ⇒ Object
35 36 37 |
# File 'lib/samovar/output.rb', line 35 def align(columns) @object.command_line(@name) end |