Class: BuildTool::Cfg::SshKeyDeclarationNodeVisitor
- Inherits:
-
ListVisitor
- Object
- VisitorBase
- ListVisitor
- BuildTool::Cfg::SshKeyDeclarationNodeVisitor
- Defined in:
- lib/build-tool/cfg/visitor.rb
Instance Attribute Summary
Attributes inherited from VisitorBase
Instance Method Summary collapse
-
#initialize(configuration) ⇒ SshKeyDeclarationNodeVisitor
constructor
A new instance of SshKeyDeclarationNodeVisitor.
- #visit_SshKeyDeclarationNode(node) ⇒ Object
- #visit_SshKeyFileNode(node) ⇒ Object
Methods inherited from ListVisitor
Constructor Details
#initialize(configuration) ⇒ SshKeyDeclarationNodeVisitor
Returns a new instance of SshKeyDeclarationNodeVisitor.
643 644 645 646 |
# File 'lib/build-tool/cfg/visitor.rb', line 643 def initialize( configuration ) super @sshkey = nil end |
Instance Method Details
#visit_SshKeyDeclarationNode(node) ⇒ Object
648 649 650 651 652 653 654 655 |
# File 'lib/build-tool/cfg/visitor.rb', line 648 def visit_SshKeyDeclarationNode( node ) name = node.values[0] stmts = node.values[1] @sshkey = BuildTool::SshKey.new( name ) configuration.add_sshkey( @sshkey ) visit_nodes( stmts ) return @sshkey end |
#visit_SshKeyFileNode(node) ⇒ Object
657 658 659 |
# File 'lib/build-tool/cfg/visitor.rb', line 657 def visit_SshKeyFileNode( node ) @sshkey.file = File.( node.value ) end |