lib/wombat/property.rb in wombat-0.2.5 vs lib/wombat/property.rb in wombat-0.3.0

- old
+ new

@@ -1,17 +1,17 @@ module Wombat class Property attr_accessor :name, :selector, :format, :namespaces, :callback, :result - def initialize options + def initialize(options) @name = options[:name] @selector = options[:selector] @format = options[:format] @namespaces = options[:namespaces] @callback = options[:callback] end - def flatten - result + def flatten(depth = nil) + depth ? result[depth] : result end end end \ No newline at end of file