Sha256: b5f596522dc928c8ad5b4c20ff91885ee7237bfbbeafb22c831eaa3a2ae01287

Contents?: true

Size: 430 Bytes

Versions: 48

Compression:

Stored size: 430 Bytes

Contents

require 'active_support/concern'

module Protobuf
  module Optionable
    extend ::ActiveSupport::Concern

    module ClassMethods
      def get_option(name)
        @_optionable_options.try(:[], name)
      end

      def set_option(name, value = true)
        @_optionable_options ||= {}
        @_optionable_options[name] = value
      end
    end

    def get_option(name)
      self.class.get_option(name)
    end

  end
end

Version data entries

48 entries across 48 versions & 4 rubygems

Version Path
protobuf-core-3.5.0 lib/protobuf/optionable.rb
protobuffy-3.6.0 lib/protobuf/optionable.rb
protobuf-3.6.12 lib/protobuf/optionable.rb
protobuf-3.6.11 lib/protobuf/optionable.rb
protobuf-3.6.10 lib/protobuf/optionable.rb
protobuf-3.6.9 lib/protobuf/optionable.rb
protobuf-3.7.0.pre0 lib/protobuf/optionable.rb
protobuf-3.6.7 lib/protobuf/optionable.rb
protobuf-3.6.6 lib/protobuf/optionable.rb
protobuf-3.6.2 lib/protobuf/optionable.rb
protobuf-3.6.1 lib/protobuf/optionable.rb
protobuf-3.6.0 lib/protobuf/optionable.rb
protobuf-3.5.5 lib/protobuf/optionable.rb
protobuf-3.5.4 lib/protobuf/optionable.rb
protobuf-3.5.3 lib/protobuf/optionable.rb
protobuf-3.5.2 lib/protobuf/optionable.rb
protobuf-3.5.1 lib/protobuf/optionable.rb
protobuffy-3.5.1 lib/protobuf/optionable.rb
protobuffy-3.4.0 lib/protobuf/optionable.rb
prepor-protobuf-3.5.1 lib/protobuf/optionable.rb