# File lib/sax-machine/config/sax_element.rb, line 6 def initialize(name, options) @name = name.to_s @with = options.fetch(:with, {}) @value = if options.has_key?(:value) options[:value].to_s else nil end @as = options[:as] @collection = options[:collection] @default = options[:default] @setter = if @collection "add_#{options[:as]}" else "#{@as}=" end @data_class = options[:class] @required = options[:required] end