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.
24 25 26 27 |
# File 'lib/samovar/output/header.rb', line 24 def initialize(name, object) @name = name @object = object end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
29 30 31 |
# File 'lib/samovar/output/header.rb', line 29 def name @name end |
#object ⇒ Object (readonly)
Returns the value of attribute object.
30 31 32 |
# File 'lib/samovar/output/header.rb', line 30 def object @object end |
Instance Method Details
#align(columns) ⇒ Object
32 33 34 |
# File 'lib/samovar/output/header.rb', line 32 def align(columns) @object.command_line(@name) end |