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.
111 112 113 114 115 116 117 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 111 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.
110 111 112 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 110 def data_filename @data_filename end |
#download_bbox_size ⇒ Object (readonly)
Returns the value of attribute download_bbox_size.
110 111 112 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 110 def download_bbox_size @download_bbox_size end |
Instance Method Details
#get_timestamp ⇒ Object
127 128 129 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 127 def return GenericCachedDownloader.new.(@data_filename) end |
#load ⇒ Object
119 120 121 122 123 124 125 |
# File 'lib/cartocss_helper/visualise_changes_image_generation.rb', line 119 def load unless @loaded DataFileLoader.load_data_into_database(@data_filename) puts "\tgenerating images" @loaded = true end end |