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.



892
893
894
895
# File 'lib/build-tool/cfg/visitor.rb', line 892

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

Instance Method Details

#visit_RemotePathNode(node) ⇒ Object



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

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

#visit_RepositoryDeclarationNode(node) ⇒ Object



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

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

#visit_SvnCheckoutOnlyNode(node) ⇒ Object



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

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

#visit_SvnDeclarationNode(node) ⇒ Object



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

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

#visit_UseRepositoryNode(node) ⇒ Object



911
912
913
914
915
916
917
# File 'lib/build-tool/cfg/visitor.rb', line 911

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