Class: Protobuf::Node::ExtensionRangeNode
- Defined in:
- lib/protobuf/compiler/nodes.rb
Instance Attribute Summary collapse
-
#high ⇒ Object
readonly
Returns the value of attribute high.
-
#low ⇒ Object
readonly
Returns the value of attribute low.
Instance Method Summary collapse
-
#initialize(low, high = nil) ⇒ ExtensionRangeNode
constructor
A new instance of ExtensionRangeNode.
-
#to_s ⇒ Object
def accept_message_visitor(visitor) end.
Methods inherited from Base
#accept_descriptor_visitor, #accept_message_visitor, #accept_rpc_visitor, #define_in_the_file
Constructor Details
#initialize(low, high = nil) ⇒ ExtensionRangeNode
Returns a new instance of ExtensionRangeNode.
305 306 307 |
# File 'lib/protobuf/compiler/nodes.rb', line 305 def initialize(low, high=nil) @low, @high = low, high end |
Instance Attribute Details
#high ⇒ Object (readonly)
Returns the value of attribute high.
303 304 305 |
# File 'lib/protobuf/compiler/nodes.rb', line 303 def high @high end |
#low ⇒ Object (readonly)
Returns the value of attribute low.
303 304 305 |
# File 'lib/protobuf/compiler/nodes.rb', line 303 def low @low end |
Instance Method Details
#to_s ⇒ Object
def accept_message_visitor(visitor) end
312 313 314 315 316 317 318 319 320 |
# File 'lib/protobuf/compiler/nodes.rb', line 312 def to_s if @high.nil? @low.to_s elsif @high == :max "#{@low}..::Protobuf::Extend::MAX" else "#{@low}..#{@high}" end end |