Class: Proptax::Generators::Report
- Inherits:
-
Thor::Group
- Object
- Thor::Group
- Proptax::Generators::Report
- Includes:
- Thor::Actions
- Defined in:
- lib/proptax/generators/report.rb
Instance Attribute Summary collapse
-
#address ⇒ Object
Returns the value of attribute address.
-
#assessed_value ⇒ Object
Returns the value of attribute assessed_value.
-
#y_axis_limits ⇒ Object
Returns the value of attribute y_axis_limits.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
permalink #address ⇒ Object
Returns the value of attribute address.
7 8 9 |
# File 'lib/proptax/generators/report.rb', line 7 def address @address end |
permalink #assessed_value ⇒ Object
Returns the value of attribute assessed_value.
7 8 9 |
# File 'lib/proptax/generators/report.rb', line 7 def assessed_value @assessed_value end |
permalink #y_axis_limits ⇒ Object
Returns the value of attribute y_axis_limits.
7 8 9 |
# File 'lib/proptax/generators/report.rb', line 7 def y_axis_limits @y_axis_limits end |
Class Method Details
permalink .source_root ⇒ Object
[View source]
26 27 28 |
# File 'lib/proptax/generators/report.rb', line 26 def self.source_root File.dirname(__FILE__) + "/report" end |
Instance Method Details
permalink #copy_report_template ⇒ Object
[View source]
17 18 19 20 21 22 23 24 |
# File 'lib/proptax/generators/report.rb', line 17 def copy_report_template CSV.foreach(csv_file, headers: true) do |row| self.address = row['Location Address'] self.assessed_value = row['Current Assessed Value'] file_name = address.gsub(/\s/, '_') template("#{opts.template}.Rmd", "reports/#{file_name}.Rmd") end end |
permalink #create_report_dir ⇒ Object
[View source]
12 13 14 15 |
# File 'lib/proptax/generators/report.rb', line 12 def create_report_dir empty_directory('reports') FileUtils.cp(csv_file, "reports") end |