Class: DtkCommon::DSL::DirectoryParser::Git

Inherits:
DtkCommon::DSL::DirectoryParser show all
Defined in:
lib/dsl/directory_parser/git.rb

Constant Summary

Constants inherited from DtkCommon::DSL::DirectoryParser

DirectoryParserMethods

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from DtkCommon::DSL::DirectoryParser

default_rel_path?, #file_content, #parse_directory

Constructor Details

#initialize(directory_type, repo_path, branch = 'master') ⇒ Git

def initialize(repo_path,directory_type,branch=‘master’)



23
24
25
26
27
28
# File 'lib/dsl/directory_parser/git.rb', line 23

def initialize(directory_type,repo_path,branch='master')
  super(directory_type)
 #       puts repo_path
  @repo_path = repo_path
  @repo_branch = GitRepo::Branch.new(repo_path,branch)
end

Class Method Details

.implements_method?(method_name) ⇒ Boolean

Returns:

  • (Boolean)


30
31
32
33
34
35
36
37
38
39
# File 'lib/dsl/directory_parser/git.rb', line 30

def self.implements_method?(method_name)
  if DirectoryParserMethods.include?(method_name)
    case method_name
     when :parse_directory
      GitRepo::Branch.implements_method?(:get_file_content)
     else
      true
    end
  end
end