Class: OpenTopo::DemFile
- Inherits:
-
Object
- Object
- OpenTopo::DemFile
- Defined in:
- lib/open_topo/dem_file.rb
Instance Attribute Summary collapse
-
#dem_type ⇒ Object
readonly
Returns the value of attribute dem_type.
-
#original_file ⇒ Object
(also: #file)
readonly
Returns the value of attribute original_file.
-
#output_format ⇒ Object
readonly
Returns the value of attribute output_format.
Instance Method Summary collapse
- #convert_to(format, file_path: nil) ⇒ Object
-
#initialize(original_file:, dem_type:, output_format:) ⇒ DemFile
constructor
A new instance of DemFile.
Constructor Details
#initialize(original_file:, dem_type:, output_format:) ⇒ DemFile
Returns a new instance of DemFile.
13 14 15 16 17 |
# File 'lib/open_topo/dem_file.rb', line 13 def initialize(original_file:, dem_type:, output_format:) @original_file = original_file @dem_type = dem_type @output_format = output_format end |
Instance Attribute Details
#dem_type ⇒ Object (readonly)
Returns the value of attribute dem_type.
9 10 11 |
# File 'lib/open_topo/dem_file.rb', line 9 def dem_type @dem_type end |
#original_file ⇒ Object (readonly) Also known as: file
Returns the value of attribute original_file.
6 7 8 |
# File 'lib/open_topo/dem_file.rb', line 6 def original_file @original_file end |
#output_format ⇒ Object (readonly)
Returns the value of attribute output_format.
11 12 13 |
# File 'lib/open_topo/dem_file.rb', line 11 def output_format @output_format end |
Instance Method Details
#convert_to(format, file_path: nil) ⇒ Object
19 20 21 |
# File 'lib/open_topo/dem_file.rb', line 19 def convert_to(format, file_path: nil) Services::DemConverter.call(original_file, format, file_path: file_path) end |