Class: CartoCSSHelper::VisualDiff::FileDataSource
- Inherits:
-
Object
- Object
- CartoCSSHelper::VisualDiff::FileDataSource
- Defined in:
- lib/cartocss_helper/visualise_changes_image_generation.rb
Instance Attribute Summary collapse
-
#data_filename ⇒ Object
readonly
Returns the value of attribute data_filename.
-
#download_bbox_size ⇒ Object
readonly
Returns the value of attribute download_bbox_size.
Instance Method Summary collapse
- #get_timestamp ⇒ Object
-
#initialize(latitude, longitude, download_bbox_size, filename) ⇒ FileDataSource
constructor
A new instance of FileDataSource.
- #load ⇒ Object
Constructor Details
#initialize(latitude, longitude, download_bbox_size, filename) ⇒ FileDataSource
Returns a new instance of FileDataSource.
113 114 115 116 117 118 119 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 113 def initialize(latitude, longitude, download_bbox_size, filename) @download_bbox_size = download_bbox_size @latitude = latitude @longitude = longitude @data_filename = filename @loaded = false end |
Instance Attribute Details
#data_filename ⇒ Object (readonly)
Returns the value of attribute data_filename.
112 113 114 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 112 def data_filename @data_filename end |
#download_bbox_size ⇒ Object (readonly)
Returns the value of attribute download_bbox_size.
112 113 114 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 112 def download_bbox_size @download_bbox_size end |
Instance Method Details
#get_timestamp ⇒ Object
129 130 131 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 129 def return GenericCachedDownloader.new.(@data_filename) end |
#load ⇒ Object
121 122 123 124 125 126 127 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 121 def load unless @loaded DataFileLoader.load_data_into_database(@data_filename) puts "\tgenerating images" @loaded = true end end |