Class: Ubill::Header
- Inherits:
-
Object
- Object
- Ubill::Header
- Includes:
- Concerns::Configurable
- Defined in:
- lib/ubill/header.rb
Instance Attribute Summary collapse
-
#left_text ⇒ Object
Returns the value of attribute left_text.
-
#right_text ⇒ Object
Returns the value of attribute right_text.
Instance Method Summary collapse
-
#initialize ⇒ Header
constructor
A new instance of Header.
- #left(value) ⇒ Object
- #right(&block) ⇒ Object
Methods included from Concerns::Configurable
Constructor Details
#initialize ⇒ Header
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_text ⇒ Object
Returns the value of attribute left_text.
7 8 9 |
# File 'lib/ubill/header.rb', line 7 def left_text @left_text end |
#right_text ⇒ Object
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 |