Sha256: 94be2b3a90e8bc9c7c88c984d3651e35c9587d07a3a8b8e76ebb715cd81fb437

Contents?: true

Size: 357 Bytes

Versions: 18

Compression:

Stored size: 357 Bytes

Contents

require 'protobuf'

# A couple of helper fields.
# Might make sense to create a patch for Protobuf.
#
Protobuf::Field::BaseField.class_eval do
  unless respond_to?(:enum?)
    def enum?
      kind_of?(Protobuf::Field::EnumField)
    end
  end

  unless respond_to?(:message?)
    def message?
      kind_of?(Protobuf::Field::MessageField)
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
active_remote-1.6.1 lib/protobuf_extensions/base_field.rb
active_remote-1.6.0 lib/protobuf_extensions/base_field.rb
active_remote-1.5.9 lib/protobuf_extensions/base_field.rb
active_remote-1.5.8 lib/protobuf_extensions/base_field.rb
active_remote-1.5.7 lib/protobuf_extensions/base_field.rb
active_remote-1.5.6 lib/protobuf_extensions/base_field.rb
active_remote-1.5.5 lib/protobuf_extensions/base_field.rb
active_remote-1.5.4 lib/protobuf_extensions/base_field.rb
active_remote-1.5.2 lib/protobuf_extensions/base_field.rb
active_remote-1.5.1 lib/protobuf_extensions/base_field.rb
active_remote-1.5.0 lib/protobuf_extensions/base_field.rb
active_remote-1.4.1 lib/protobuf_extensions/base_field.rb
active_remote-1.4.0 lib/protobuf_extensions/base_field.rb
active_remote-1.3.3 lib/protobuf_extensions/base_field.rb
active_remote-1.3.2 lib/protobuf_extensions/base_field.rb
active_remote-1.3.1 lib/protobuf_extensions/base_field.rb
active_remote-1.3.0 lib/protobuf_extensions/base_field.rb
active_remote-1.2.1 lib/protobuf_extensions/base_field.rb