Class: Samovar::Output::Header

Inherits:
Object
  • Object
show all
Defined in:
lib/samovar/output/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (readonly)

Returns the value of attribute name.



14
15
16
# File 'lib/samovar/output/header.rb', line 14

def name
  @name
end

#objectObject (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