Sha256: 1504ed850d85772db0b5401f7ed822c201e0deb28c81d529864acd859047c90f

Contents?: true

Size: 453 Bytes

Versions: 2

Compression:

Stored size: 453 Bytes

Contents

module SAXMachine
  class SAXConfig
    class ElementValueConfig
      attr_reader :name, :setter, :data_class

      def initialize(name, options)
        @name     = name.to_s
        @as       = options[:as]
        @setter   = "#{@as}="
        @required = options[:required]
        @data_class = options[:class]
      end

      def column
        @as || @name.to_sym
      end

      def required?
        !!@required
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
sax-machine-1.3.2 lib/sax-machine/config/sax_element_value.rb
sax-machine-1.3.1 lib/sax-machine/config/sax_element_value.rb