Sha256: 6eb160573a75ca2c2aa9e66095848925fee5f443cede9629c2b6e721cc08b8a5

Contents?: true

Size: 506 Bytes

Versions: 1

Compression:

Stored size: 506 Bytes

Contents

module SAXMachine
  class SAXConfig
    
    class CollectionConfig
      attr_reader :name
      
      def initialize(name, options)
        @name  = name.to_s
        @class = options[:class]
        @as    = options[:as].to_s
      end
      
      def handler
        SAXHandler.new(@class.new)
      end
      
      def accessor
        as
      end
      
    protected
      
      def as
        @as
      end
      
      def class
        @class || @name
      end      
    end
    
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
UnderpantsGnome-sax-machine-0.0.14 lib/sax-machine/sax_collection_config.rb