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.
303 304 305 |
# File 'lib/protobuf/compiler/nodes.rb', line 303 def initialize(low, high=nil) @low, @high = low, high end |
Instance Attribute Details
#high ⇒ Object (readonly)
Returns the value of attribute high.
301 302 303 |
# File 'lib/protobuf/compiler/nodes.rb', line 301 def high @high end |
#low ⇒ Object (readonly)
Returns the value of attribute low.
301 302 303 |
# File 'lib/protobuf/compiler/nodes.rb', line 301 def low @low end |
Instance Method Details
#to_s ⇒ Object
def accept_message_visitor(visitor) end
310 311 312 313 314 315 316 317 318 |
# File 'lib/protobuf/compiler/nodes.rb', line 310 def to_s if @high.nil? @low.to_s elsif @high == :max "#{@low}..::Protobuf::Extend::MAX" else "#{@low}..#{@high}" end end |