Class: Samovar::Output::Header
- Inherits:
-
Object
- Object
- Samovar::Output::Header
- Defined in:
- lib/samovar/output/header.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.
9 10 11 12 |
# File 'lib/samovar/output/header.rb', line 9 def initialize(name, object) @name = name @object = object end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
14 15 16 |
# File 'lib/samovar/output/header.rb', line 14 def name @name end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
15 16 17 |
# File 'lib/samovar/output/header.rb', line 15 def object @object end |
Instance Method Details
#align(columns) ⇒ Object
17 18 19 |
# File 'lib/samovar/output/header.rb', line 17 def align(columns) @object.command_line(@name) end |