Class: URBANopt::Scenario::Extension

Inherits:
OpenStudio::Extension::Extension
  • Object
show all
Defined in:
lib/urbanopt/scenario/extension.rb

Instance Method Summary collapse

Constructor Details

#initializeExtension

Returns a new instance of Extension.



46
47
48
49
# File 'lib/urbanopt/scenario/extension.rb', line 46

def initialize
  super
  @root_dir = File.absolute_path(File.join(File.dirname(__FILE__), '..', '..', '..'))
end

Instance Method Details

#doc_templates_dirObject

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:

Absolute path of the doc templates dir or nil if there is none.



70
71
72
# File 'lib/urbanopt/scenario/extension.rb', line 70

def doc_templates_dir
  return File.absolute_path(File.join(@root_dir, 'doc_templates'))
end

#files_dirObject

Relevant files such as weather data, design days, etc.

return:

Absolute path of the files or nil if there is none, used when configuring OSWs



61
62
63
# File 'lib/urbanopt/scenario/extension.rb', line 61

def files_dir
  return nil
end

#measures_dirObject

return:

Absolute path of the measures or nil if there is none, can be used when configuring OSWs.



53
54
55
# File 'lib/urbanopt/scenario/extension.rb', line 53

def measures_dir
  return File.absolute_path(File.join(@root_dir, 'lib', 'measures'))
end