Sha256: 122ffcdcbdc3c295ec1e430ec9164291a41f86d9a51ee14cb34ea026b0d72351
Contents?: true
Size: 461 Bytes
Versions: 8
Compression:
Stored size: 461 Bytes
Contents
module HappyMapper 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
8 entries across 8 versions & 4 rubygems