Class: Ubill::Header

Inherits:
Object
  • Object
show all
Includes:
Concerns::Configurable
Defined in:
lib/ubill/header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Concerns::Configurable

#configure

Constructor Details

#initializeHeader

Returns a new instance of Header.



9
10
11
12
# File 'lib/ubill/header.rb', line 9

def initialize
  self.left_text = ""
  self.right_text = Line.new
end

Instance Attribute Details

#left_textObject

Returns the value of attribute left_text.



7
8
9
# File 'lib/ubill/header.rb', line 7

def left_text
  @left_text
end

#right_textObject

Returns the value of attribute right_text.



7
8
9
# File 'lib/ubill/header.rb', line 7

def right_text
  @right_text
end

Instance Method Details

#left(value) ⇒ Object



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

def left(value)
  self.left_text = value
end

#right(&block) ⇒ Object



18
19
20
# File 'lib/ubill/header.rb', line 18

def right(&block)
  right_text.instance_eval(&block)
end