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.
870 871 872 873 |
# File 'lib/build-tool/cfg/visitor.rb', line 870 def initialize( configuration ) super @sshkey = nil end |
Instance Method Details
#visit_SshKeyDeclarationNode(node) ⇒ Object
875 876 877 878 879 880 881 882 |
# File 'lib/build-tool/cfg/visitor.rb', line 875 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
884 885 886 |
# File 'lib/build-tool/cfg/visitor.rb', line 884 def visit_SshKeyFileNode( node ) @sshkey.file = File.( node.value ) end |