Class: URBANopt::Reporting::Extension

Inherits:
OpenStudio::Extension::Extension
  • Object
show all
Defined in:
lib/urbanopt/reporting/derived_extension.rb,
lib/urbanopt/reporting/default_reports/extension.rb

Instance Method Summary collapse

Constructor Details

#initializeExtension

Override the base class



12
13
14
# File 'lib/urbanopt/reporting/derived_extension.rb', line 12

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

Instance Method Details

#doc_templates_dirObject

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/reporting/derived_extension.rb', line 33

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

#files_dirObject

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/reporting/derived_extension.rb', line 26

def files_dir
  return nil
end

#measures_dirObject

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/reporting/derived_extension.rb', line 19

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