Class: ProtobufDescriptor::EnumDescriptor
- Inherits:
-
Object
- Object
- ProtobufDescriptor::EnumDescriptor
- Includes:
- NamedChild
- Defined in:
- lib/protobuf_descriptor/enum_descriptor.rb
Overview
Describes an enum type.
See href="https://code.google.com/p/protobuf/source/browse/trunk/src/google/protobuf/descriptor.proto#84">
Instance Attribute Summary collapse
-
#enum_descriptor_proto ⇒ Object
readonly
The
EnumDescriptorProto
thisEnumDescriptor
is wrapping. -
#parent ⇒ Object
readonly
The containing FileDescriptor or MessageDescriptor that defines this enum.
Instance Method Summary collapse
-
#initialize(parent, enum_descriptor_proto) ⇒ EnumDescriptor
constructor
A new instance of EnumDescriptor.
-
#name ⇒ Object
The name of the enum.
-
#options ⇒ Object
The
EnumOptions
defined for this enum. -
#value ⇒ Object
(also: #values)
The possible values of the enum.
Methods included from NamedChild
#fully_qualified_java_name, #fully_qualified_name, #fully_qualified_ruby_name, #fully_qualified_wire_name
Constructor Details
#initialize(parent, enum_descriptor_proto) ⇒ EnumDescriptor
Returns a new instance of EnumDescriptor.
18 19 20 21 |
# File 'lib/protobuf_descriptor/enum_descriptor.rb', line 18 def initialize(parent, enum_descriptor_proto) @parent = parent @enum_descriptor_proto = enum_descriptor_proto end |
Instance Attribute Details
#enum_descriptor_proto ⇒ Object (readonly)
The EnumDescriptorProto
this EnumDescriptor
is wrapping.
16 17 18 |
# File 'lib/protobuf_descriptor/enum_descriptor.rb', line 16 def enum_descriptor_proto @enum_descriptor_proto end |
#parent ⇒ Object (readonly)
The containing FileDescriptor or MessageDescriptor that defines this enum.
13 14 15 |
# File 'lib/protobuf_descriptor/enum_descriptor.rb', line 13 def parent @parent end |
Instance Method Details
#name ⇒ Object
The name of the enum
24 |
# File 'lib/protobuf_descriptor/enum_descriptor.rb', line 24 def name; enum_descriptor_proto.name; end |
#options ⇒ Object
The EnumOptions
defined for this enum
31 |
# File 'lib/protobuf_descriptor/enum_descriptor.rb', line 31 def ; enum_descriptor_proto.; end |
#value ⇒ Object Also known as: values
The possible values of the enum
27 |
# File 'lib/protobuf_descriptor/enum_descriptor.rb', line 27 def value; enum_descriptor_proto.value; end |