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
#address ⇒ Object
Returns the value of attribute address.
7 8 9 |
# File 'lib/proptax/generators/report.rb', line 7 def address @address end |
#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 |
#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
.source_root ⇒ Object
26 27 28 |
# File 'lib/proptax/generators/report.rb', line 26 def self.source_root File.dirname(__FILE__) + "/report" end |
Instance Method Details
#copy_report_template ⇒ Object
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 |
#create_report_dir ⇒ Object
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 |