Class: Protobuf::Node::ImportNode
- Defined in:
- lib/protobuf/compiler/nodes.rb
Instance Method Summary collapse
- #accept_descriptor_visitor(visitor) ⇒ Object
- #accept_message_visitor(visitor) ⇒ Object
-
#initialize(path) ⇒ ImportNode
constructor
A new instance of ImportNode.
Methods inherited from Base
#accept_rpc_visitor, #define_in_the_file
Constructor Details
#initialize(path) ⇒ ImportNode
Returns a new instance of ImportNode.
56 57 58 |
# File 'lib/protobuf/compiler/nodes.rb', line 56 def initialize(path) @path = path end |
Instance Method Details
#accept_descriptor_visitor(visitor) ⇒ Object
64 65 66 |
# File 'lib/protobuf/compiler/nodes.rb', line 64 def accept_descriptor_visitor(visitor) visitor.current_descriptor.dependency << @path end |
#accept_message_visitor(visitor) ⇒ Object
60 61 62 |
# File 'lib/protobuf/compiler/nodes.rb', line 60 def (visitor) visitor.write("require '#{visitor.(@path)}'") end |