class ProtobufDescriptor::EnumDescriptor

Describes an enum type.

See {EnumDescriptorProto}

Attributes

enum_descriptor_proto[R]

The EnumDescriptorProto this EnumDescriptor is wrapping.

parent[R]

The containing {ProtobufDescriptor::FileDescriptor} or {ProtobufDescriptor::MessageDescriptor} that defines this enum.

value[R]

List of the enum values for this ‘EnumDescriptor` as a `NamedCollection` of {ProtobufDescriptor::EnumValueDescriptor}

values[R]

List of the enum values for this ‘EnumDescriptor` as a `NamedCollection` of {ProtobufDescriptor::EnumValueDescriptor}

Public Class Methods

new(parent, enum_descriptor_proto) click to toggle source
# File lib/protobuf_descriptor/enum_descriptor.rb, line 24
def initialize(parent, enum_descriptor_proto)
  @parent = parent
  @enum_descriptor_proto = enum_descriptor_proto

  @value = ProtobufDescriptor::NamedCollection.new(
      enum_descriptor_proto.value.map { |m|
        ProtobufDescriptor::EnumValueDescriptor.new(self, m)
      })
end

Public Instance Methods

name() click to toggle source

The name of the enum

# File lib/protobuf_descriptor/enum_descriptor.rb, line 35
def name; enum_descriptor_proto.name; end
options() click to toggle source

The EnumOptions defined for this enum

# File lib/protobuf_descriptor/enum_descriptor.rb, line 38
def options; enum_descriptor_proto.options; end