Parent

SAXMachine::SAXConfig::CollectionConfig

Attributes

name[R]

Public Class Methods

new(name, options) click to toggle source
# File lib/sax-machine/sax_collection_config.rb, line 7
def initialize(name, options)
  @name   = name.to_s
  @class  = options[:class]
  @as     = options[:as].to_s
  
  if options.has_key?(:with)
    # for faster comparisons later
    @with = options[:with].to_a.flatten.collect {|o| o.to_s}
  else
    @with = nil
  end
end

Public Instance Methods

accessor() click to toggle source
# File lib/sax-machine/sax_collection_config.rb, line 20
def accessor
  as
end
attrs_match?(attrs) click to toggle source
# File lib/sax-machine/sax_collection_config.rb, line 24
def attrs_match?(attrs)
  if @with
    @with == (@with & attrs)
  else
    true
  end
end
data_class() click to toggle source
# File lib/sax-machine/sax_collection_config.rb, line 32
def data_class
  @class || @name
end

Protected Instance Methods

as() click to toggle source
# File lib/sax-machine/sax_collection_config.rb, line 38
def as
  @as
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.