Class: BuildTool::Cfg::SvnDeclarationNodeVisitor

Inherits:
ListVisitor show all
Defined in:
lib/build-tool/cfg/visitor.rb

Instance Attribute Summary

Attributes inherited from MJ::VisitorBase

#configuration

Instance Method Summary collapse

Methods inherited from ListVisitor

#visit, #visit_nodes

Methods inherited from MJ::VisitorBase

#visit_Object

Constructor Details

#initialize(configuration, vcs) ⇒ SvnDeclarationNodeVisitor

Returns a new instance of SvnDeclarationNodeVisitor.



896
897
898
899
# File 'lib/build-tool/cfg/visitor.rb', line 896

def initialize( configuration, vcs )
    super( configuration )
    @vcs = vcs
end

Instance Method Details

#visit_RemotePathNode(node) ⇒ Object



923
924
925
# File 'lib/build-tool/cfg/visitor.rb', line 923

def visit_RemotePathNode( node )
    @vcs.remote_path = node.value
end

#visit_RepositoryDeclarationNode(node) ⇒ Object



910
911
912
913
# File 'lib/build-tool/cfg/visitor.rb', line 910

def visit_RepositoryDeclarationNode( node )
    visitor = RepositoryDeclarationNodeVisitor.new( configuration )
    @vcs.repository = node.accept( visitor )
end

#visit_SvnCheckoutOnlyNode(node) ⇒ Object



906
907
908
# File 'lib/build-tool/cfg/visitor.rb', line 906

def visit_SvnCheckoutOnlyNode( node )
    @vcs.only = node.value.split( / +/ )
end

#visit_SvnDeclarationNode(node) ⇒ Object



901
902
903
904
# File 'lib/build-tool/cfg/visitor.rb', line 901

def visit_SvnDeclarationNode( node )
    visit_nodes( node.values )
    return @vcs
end

#visit_UseRepositoryNode(node) ⇒ Object



915
916
917
918
919
920
921
# File 'lib/build-tool/cfg/visitor.rb', line 915

def visit_UseRepositoryNode( node )
    repo = configuration.repository( node.value )
    if repo.nil?
        raise ConfigurationError, "Unknown repository #{node.value}!"
    end
    @vcs.repository = repo
end