Sha256: ba26981b12380a6c61e8c4b98b51e05b0877f95b88d417cc2a87fee38e586be9

Contents?: true

Size: 389 Bytes

Versions: 7

Compression:

Stored size: 389 Bytes

Contents

module SAXMachine
  class SAXConfig

    class ElementValueConfig
      attr_reader :name, :setter

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

      def column
        @as || @name.to_sym
      end

      def required?
        @required
      end
    end

  end
end

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
lazy-sax-machine-0.1.1 lib/lazy-sax-machine/sax_element_value_config.rb
lazy-sax-machine-0.1.0 lib/lazy-sax-machine/sax_element_value_config.rb
sax-machine-0.2.1 lib/sax-machine/sax_element_value_config.rb
sax-machine-patched-0.2.0.rc2 lib/sax-machine/sax_element_value_config.rb
sax-machine-0.2.0.rc1 lib/sax-machine/sax_element_value_config.rb
sax-machine-0.1.0 lib/sax-machine/sax_element_value_config.rb
sax-machine-0.0.20 lib/sax-machine/sax_element_value_config.rb