Class: Planik::Lohnausweis::Daten::Block
- Inherits:
-
Object
- Object
- Planik::Lohnausweis::Daten::Block
- Defined in:
- lib/lohnausweis/daten.rb
Instance Attribute Summary collapse
-
#eintraege ⇒ Object
readonly
Returns the value of attribute eintraege.
-
#titel_leiste ⇒ Object
readonly
Returns the value of attribute titel_leiste.
Instance Method Summary collapse
- #daten ⇒ Object
-
#initialize(eintraege, titel_leiste = nil) ⇒ Block
constructor
A new instance of Block.
Constructor Details
#initialize(eintraege, titel_leiste = nil) ⇒ Block
Returns a new instance of Block.
10 11 12 |
# File 'lib/lohnausweis/daten.rb', line 10 def initialize eintraege, titel_leiste = nil @eintraege, @titel_leiste = eintraege, titel_leiste end |
Instance Attribute Details
#eintraege ⇒ Object (readonly)
Returns the value of attribute eintraege.
8 9 10 |
# File 'lib/lohnausweis/daten.rb', line 8 def eintraege @eintraege end |
#titel_leiste ⇒ Object (readonly)
Returns the value of attribute titel_leiste.
7 8 9 |
# File 'lib/lohnausweis/daten.rb', line 7 def titel_leiste @titel_leiste end |
Instance Method Details
#daten ⇒ Object
14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/lohnausweis/daten.rb', line 14 def daten d = [] d << titel_leiste unless titel_leiste.nil? eintraege.each do |e| x = [] x << e.name x << e.menge_to_s x << e.ansatz_to_s x << e.betrag_gerundet_to_s d << x end d end |