Module: Protod::Proto

Defined in:
lib/protod/proto/part.rb,
lib/protod/proto/field.rb,
lib/protod/proto/oneof.rb,
lib/protod/proto/builder.rb,
lib/protod/proto/message.rb,
lib/protod/proto/package.rb,
lib/protod/proto/service.rb,
lib/protod/proto/features.rb,
lib/protod/proto/procedure.rb

Defined Under Namespace

Modules: FieldCollectable, FieldNumeringable, Findable, InterpreterBindable Classes: Builder, Field, Ident, Message, Oneof, Package, Part, Procedure, Service

Class Method Summary collapse

Class Method Details

.omits_field?(pb, name) ⇒ Boolean

Returns:

  • (Boolean)


7
8
9
10
11
# File 'lib/protod/proto/features.rb', line 7

def omits_field?(pb, name)
  return false unless pb.respond_to?("has_#{name}?")
  return false if pb.public_send("has_#{name}?")
  true
end