Class: AUB::Payroll::SummaryFile::HTMLGenerator
- Inherits:
-
Object
- Object
- AUB::Payroll::SummaryFile::HTMLGenerator
- Defined in:
- lib/aub/payroll/summary_file/html_generator.rb
Instance Attribute Summary collapse
-
#company_info ⇒ Object
readonly
Returns the value of attribute company_info.
-
#payroll_info ⇒ Object
readonly
Returns the value of attribute payroll_info.
-
#transactions ⇒ Object
readonly
Returns the value of attribute transactions.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(company_info:, payroll_info:, transactions:) ⇒ HTMLGenerator
constructor
A new instance of HTMLGenerator.
Constructor Details
#initialize(company_info:, payroll_info:, transactions:) ⇒ HTMLGenerator
Returns a new instance of HTMLGenerator.
6 7 8 9 10 |
# File 'lib/aub/payroll/summary_file/html_generator.rb', line 6 def initialize(company_info:, payroll_info:, transactions:) @company_info = company_info @payroll_info = payroll_info @transactions = transactions end |
Instance Attribute Details
#company_info ⇒ Object (readonly)
Returns the value of attribute company_info.
27 28 29 |
# File 'lib/aub/payroll/summary_file/html_generator.rb', line 27 def company_info @company_info end |
#payroll_info ⇒ Object (readonly)
Returns the value of attribute payroll_info.
27 28 29 |
# File 'lib/aub/payroll/summary_file/html_generator.rb', line 27 def payroll_info @payroll_info end |
#transactions ⇒ Object (readonly)
Returns the value of attribute transactions.
27 28 29 |
# File 'lib/aub/payroll/summary_file/html_generator.rb', line 27 def transactions @transactions end |
Instance Method Details
#generate ⇒ Object
12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/aub/payroll/summary_file/html_generator.rb', line 12 def generate Dir.mktmpdir do |dir| Dir.chdir(dir) do render 'body.slim', 'body.html' render 'header.slim', 'header.html' render 'footer.slim', 'footer.html' render 'style.scss', 'style.css' render 'clear.css', with: :copy render 'footer.js', with: :copy render 'underscore-min.js', with: :copy, from: :vendor yield end end end |