Class: Pb::TypeInfo

Inherits:
Object
  • Object
show all
Defined in:
lib/pb.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(type:, subtype:) ⇒ TypeInfo

Returns a new instance of TypeInfo.

Parameters:

  • type (Symbol)

    The type of protobuf field. e.g. :enum, :int64, :string, :int32, :bool, :message, etc.

  • subtype (Google::Protobuf::Descriptor, nil)


187
188
189
190
# File 'lib/pb.rb', line 187

def initialize(type:, subtype:)
  @type    = type
  @subtype = subtype
end

Instance Attribute Details

#subtypeObject (readonly)

Returns the value of attribute subtype.



191
192
193
# File 'lib/pb.rb', line 191

def subtype
  @subtype
end

#typeObject (readonly)

Returns the value of attribute type.



191
192
193
# File 'lib/pb.rb', line 191

def type
  @type
end