Class: BuildTool::Cfg::ArchiveDeclarationNodeVisitor
- Inherits:
-
ListVisitor
- Object
- MJ::VisitorBase
- ListVisitor
- BuildTool::Cfg::ArchiveDeclarationNodeVisitor
- Defined in:
- lib/build-tool/cfg/visitor.rb
Instance Attribute Summary
Attributes inherited from MJ::VisitorBase
Instance Method Summary collapse
-
#initialize(configuration, vcs) ⇒ ArchiveDeclarationNodeVisitor
constructor
A new instance of ArchiveDeclarationNodeVisitor.
- #visit_ArchiveDeclarationNode(node) ⇒ Object
- #visit_RemotePathNode(node) ⇒ Object
- #visit_RepositoryDeclarationNode(node) ⇒ Object
- #visit_UseRepositoryNode(node) ⇒ Object
Methods inherited from ListVisitor
Methods inherited from MJ::VisitorBase
Constructor Details
#initialize(configuration, vcs) ⇒ ArchiveDeclarationNodeVisitor
Returns a new instance of ArchiveDeclarationNodeVisitor.
192 193 194 195 |
# File 'lib/build-tool/cfg/visitor.rb', line 192 def initialize( configuration, vcs ) super( configuration ) @vcs = vcs end |
Instance Method Details
#visit_ArchiveDeclarationNode(node) ⇒ Object
197 198 199 200 |
# File 'lib/build-tool/cfg/visitor.rb', line 197 def visit_ArchiveDeclarationNode( node ) visit_nodes( node.values ) return @vcs end |
#visit_RemotePathNode(node) ⇒ Object
215 216 217 |
# File 'lib/build-tool/cfg/visitor.rb', line 215 def visit_RemotePathNode( node ) @vcs.remote_path = node.value end |
#visit_RepositoryDeclarationNode(node) ⇒ Object
202 203 204 205 |
# File 'lib/build-tool/cfg/visitor.rb', line 202 def visit_RepositoryDeclarationNode( node ) visitor = RepositoryDeclarationNodeVisitor.new( configuration ) @vcs.repository = node.accept( visitor ) end |
#visit_UseRepositoryNode(node) ⇒ Object
207 208 209 210 211 212 213 |
# File 'lib/build-tool/cfg/visitor.rb', line 207 def visit_UseRepositoryNode( node ) repo = configuration.repository( node.value ) if repo.nil? raise ConfigurationError, "Unknown repository #{node.value}!" end @vcs.repository = repo end |