Sha256: be2fad171d5079046d625e586ef37269e1cbd9e378a67cc2f71c25b6d42eb708
Contents?: true
Size: 890 Bytes
Versions: 18
Compression:
Stored size: 890 Bytes
Contents
module GroupDocs class DataSource::Field < GroupDocs::Api::Entity TYPES = { text: 0, binary: 1, } # @attr [String] field attr_accessor :field # @attr [Integer] type attr_accessor :type # @attr [Array<String>] values attr_accessor :values # Compatibility with response JSON alias_method :name=, :field= # # Updates type with machine-readable format. # # @param [Symbol] type # @raise [ArgumentError] if type is unknown # def type=(type) if type.is_a?(Symbol) TYPES.keys.include?(type) or raise ArgumentError, "Unknown type: #{type.inspect}" type = TYPES[type] end @type = type end # # Returns field type in human-readable format. # # @return [Symbol] # def type TYPES.invert[@type] end end # DataSource::Field end # GroupDocs
Version data entries
18 entries across 18 versions & 1 rubygems