Class: OpenStudio::Extension::RakeTask

Inherits:
Rake::TaskLib
  • Object
show all
Defined in:
lib/openstudio/extension/rake_task.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(*args, &task_block) ⇒ RakeTask

Returns a new instance of RakeTask.



16
17
18
19
20
# File 'lib/openstudio/extension/rake_task.rb', line 16

def initialize(*args, &task_block)
  @name = args.shift || :openstudio

  setup_subtasks(@name)
end

Instance Attribute Details

#core_dirObject

Returns the value of attribute core_dir.



14
15
16
# File 'lib/openstudio/extension/rake_task.rb', line 14

def core_dir
  @core_dir
end

#doc_templates_dirObject

Returns the value of attribute doc_templates_dir.



14
15
16
# File 'lib/openstudio/extension/rake_task.rb', line 14

def doc_templates_dir
  @doc_templates_dir
end

#files_dirObject

Returns the value of attribute files_dir.



14
15
16
# File 'lib/openstudio/extension/rake_task.rb', line 14

def files_dir
  @files_dir
end

#measures_dirObject

Returns the value of attribute measures_dir.



14
15
16
# File 'lib/openstudio/extension/rake_task.rb', line 14

def measures_dir
  @measures_dir
end

#nameObject

Returns the value of attribute name.



14
15
16
# File 'lib/openstudio/extension/rake_task.rb', line 14

def name
  @name
end

Instance Method Details

#set_extension_class(extension_class, github_repo = '') ⇒ Object



22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/openstudio/extension/rake_task.rb', line 22

def set_extension_class(extension_class, github_repo = '')
  @extension_class = extension_class
  @extension = extension_class.new
  @root_dir = @extension.root_dir
  # Catch if measures_dir is nil, then just make it an empty string
  @measures_dir = @extension.measures_dir || ''
  @staged_path = "#{@measures_dir}/staged"
  @core_dir = @extension.core_dir
  @doc_templates_dir = @extension.doc_templates_dir
  @files_dir = @extension.files_dir
  @github_repo = github_repo
end