Class: BuildTool::Cfg::GitDeclarationNodeVisitor
Instance Attribute Summary
#configuration
Instance Method Summary
collapse
included
#visit_GitRemotePushNode, #visit_GitRemoteUrlNode
Methods inherited from ListVisitor
#visit, #visit_nodes
#visit_Object
Constructor Details
Returns a new instance of GitDeclarationNodeVisitor.
417
418
419
420
421
422
|
# File 'lib/build-tool/cfg/visitor.rb', line 417
def initialize( configuration, vcs )
super( configuration )
@remote = BuildTool::VCS::GitRemote.new( "origin" )
@vcs = vcs
@vcs.remote[@remote.name] = @remote
end
|
Instance Method Details
#visit_GitDeclarationNode(node) ⇒ Object
424
425
426
427
428
429
430
|
# File 'lib/build-tool/cfg/visitor.rb', line 424
def visit_GitDeclarationNode( node )
visit_nodes( node.values )
if @remote.server.nil? and @remote.path.nil?
@vcs.remote.delete( "origin" )
end
return @vcs
end
|
#visit_GitRemoteDeclarationNode(node) ⇒ Object
432
433
434
435
436
|
# File 'lib/build-tool/cfg/visitor.rb', line 432
def visit_GitRemoteDeclarationNode( node )
visitor = GitRemoteDeclarationNodeVisitor.new( configuration )
remote = node.accept(visitor)
@vcs.remote[remote.name] = remote
end
|
#visit_GitTrackNode(node) ⇒ Object
438
439
440
|
# File 'lib/build-tool/cfg/visitor.rb', line 438
def visit_GitTrackNode( node )
@vcs.track = node.values
end
|