Class: URBANopt::GeoJSON::Extension
- Inherits:
-
OpenStudio::Extension::Extension
- Object
- OpenStudio::Extension::Extension
- URBANopt::GeoJSON::Extension
- Defined in:
- lib/urbanopt/geojson/derived_extension.rb
Instance Method Summary collapse
-
#doc_templates_dir ⇒ Object
The directory containing common files like copyright and license notices which are used to update measures and other code.
-
#files_dir ⇒ Object
The directory containign relevant files such as weather data, design days, etc.
-
#initialize ⇒ Extension
constructor
:nodoc:.
-
#measures_dir ⇒ Object
Returns the absolute path of the measures or returns nil, in case no measures are added.
Constructor Details
#initialize ⇒ Extension
:nodoc:
12 13 14 |
# File 'lib/urbanopt/geojson/derived_extension.rb', line 12 def initialize # :nodoc: @root_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..')) end |
Instance Method Details
#doc_templates_dir ⇒ Object
The directory containing common files like copyright and license notices which are used to update measures and other code. This method will only be applied to measures in the current repository and returns the absolute path of the doc_templates_dir or nil if there is none.
33 34 35 |
# File 'lib/urbanopt/geojson/derived_extension.rb', line 33 def doc_templates_dir return File.absolute_path(File.join(@root_dir, 'doc_templates')) end |
#files_dir ⇒ Object
The directory containign relevant files such as weather data, design days, etc. The method returns nil if no files are present. It is used while configuring OSWs.
26 27 28 |
# File 'lib/urbanopt/geojson/derived_extension.rb', line 26 def files_dir return nil end |
#measures_dir ⇒ Object
Returns the absolute path of the measures or returns nil, in case no measures are added. It can be used while configuring OSWs.
19 20 21 |
# File 'lib/urbanopt/geojson/derived_extension.rb', line 19 def measures_dir return File.absolute_path(File.join(@root_dir, 'lib/measures')) end |