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.
55 56 57 |
# File 'lib/protobuf/compiler/nodes.rb', line 55 def initialize(path) @path = path end |
Instance Method Details
#accept_descriptor_visitor(visitor) ⇒ Object
63 64 65 |
# File 'lib/protobuf/compiler/nodes.rb', line 63 def accept_descriptor_visitor(visitor) visitor.current_descriptor.dependency << @path end |
#accept_message_visitor(visitor) ⇒ Object
59 60 61 |
# File 'lib/protobuf/compiler/nodes.rb', line 59 def (visitor) visitor.write("require '#{visitor.(@path)}'") end |