Class: URBANopt::Scenario::Extension
- Inherits:
-
OpenStudio::Extension::Extension
- Object
- OpenStudio::Extension::Extension
- URBANopt::Scenario::Extension
- Defined in:
- lib/urbanopt/scenario/extension.rb
Instance Method Summary collapse
-
#doc_templates_dir ⇒ Object
Doc templates are common files like copyright files which are used to update measures and other code.
-
#files_dir ⇒ Object
Relevant files such as weather data, design days, etc.
-
#initialize ⇒ Extension
constructor
A new instance of Extension.
-
#measures_dir ⇒ Object
Returns the absolute path of the measures or nil if there is none, can be used when configuring OSWs.
Constructor Details
#initialize ⇒ Extension
36 37 38 39 |
# File 'lib/urbanopt/scenario/extension.rb', line 36 def initialize super @root_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..')) end |
Instance Method Details
#doc_templates_dir ⇒ Object
Doc templates are common files like copyright files which are used to update measures and other code. Doc templates will only be applied to measures in the current repository. Return the absolute path of the doc templates dir or nil if there is none.
58 59 60 |
# File 'lib/urbanopt/scenario/extension.rb', line 58 def doc_templates_dir return File.absolute_path(File.join(@root_dir, 'doc_templates')) end |
#files_dir ⇒ Object
Relevant files such as weather data, design days, etc. Return the absolute path of the files or nil if there is none, used when configuring OSWs
50 51 52 |
# File 'lib/urbanopt/scenario/extension.rb', line 50 def files_dir return nil end |
#measures_dir ⇒ Object
Returns the absolute path of the measures or nil if there is none, can be used when configuring OSWs.
43 44 45 |
# File 'lib/urbanopt/scenario/extension.rb', line 43 def measures_dir return File.absolute_path(File.join(@root_dir, 'lib', 'measures')) end |