Sha256: 6791449ea9ddc75417f64f342d83c5eb3762e5e5af46198ea0bb15b1da23c6e6
Contents?: true
Size: 874 Bytes
Versions: 48
Compression:
Stored size: 874 Bytes
Contents
# encoding: utf-8 require_relative "validatable" module LogStash module Filters module Jdbc class Column < Validatable attr_reader :name, :datatype private def post_initialize if valid? @name = @name.to_sym @datatype = @datatype.to_sym end end def to_array [@name.to_s, @datatype.to_s] end def parse_options unless @options.is_a?(Array) @option_errors << "The column options must be an array" end @name, @datatype = @options unless @name && @name.is_a?(String) @option_errors << "The first column option is the name and must be a string" end unless @datatype && @datatype.is_a?(String) @option_errors << "The second column option is the datatype and must be a string" end @valid = @option_errors.empty? end end end end end
Version data entries
48 entries across 48 versions & 2 rubygems