Class: BuildTool::Cfg::SshKeyDeclarationNodeVisitor
- Inherits:
-
ListVisitor
- Object
- MJ::VisitorBase
- ListVisitor
- BuildTool::Cfg::SshKeyDeclarationNodeVisitor
- Defined in:
- lib/build-tool/cfg/visitor.rb
Instance Attribute Summary
Attributes inherited from MJ::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
Methods inherited from MJ::VisitorBase
Constructor Details
#initialize(configuration) ⇒ SshKeyDeclarationNodeVisitor
Returns a new instance of SshKeyDeclarationNodeVisitor.
866 867 868 869 |
# File 'lib/build-tool/cfg/visitor.rb', line 866 def initialize( configuration ) super @sshkey = nil end |
Instance Method Details
#visit_SshKeyDeclarationNode(node) ⇒ Object
871 872 873 874 875 876 877 878 |
# File 'lib/build-tool/cfg/visitor.rb', line 871 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
880 881 882 |
# File 'lib/build-tool/cfg/visitor.rb', line 880 def visit_SshKeyFileNode( node ) @sshkey.file = File.( node.value ) end |