Sha256: a84638a9ff99f84d62c5fc55b59269d87ce63ea4b6d2ea4a92343d50e4c4f0ad
Contents?: true
Size: 459 Bytes
Versions: 12
Compression:
Stored size: 459 Bytes
Contents
module XmlMapper class Attribute < Item attr_accessor :default # @see Item#initialize # Additional options: # :default => Object The default value for this def initialize(name, type, o={}) super self.default = o[:default] end def find(node, namespace, xpath_options) if options[:xpath] yield(node.xpath(options[:xpath],xpath_options)) else yield(node[tag]) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems