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.
414
415
416
417
418
419
|
# File 'lib/build-tool/cfg/visitor.rb', line 414
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
421
422
423
424
425
426
427
|
# File 'lib/build-tool/cfg/visitor.rb', line 421
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
429
430
431
432
433
|
# File 'lib/build-tool/cfg/visitor.rb', line 429
def visit_GitRemoteDeclarationNode( node )
visitor = GitRemoteDeclarationNodeVisitor.new( configuration )
remote = node.accept(visitor)
@vcs.remote[remote.name] = remote
end
|
#visit_GitTrackNode(node) ⇒ Object
435
436
437
|
# File 'lib/build-tool/cfg/visitor.rb', line 435
def visit_GitTrackNode( node )
@vcs.track = node.values
end
|