Skip to content

Commit

Permalink
Removing more obsolete code
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecsl committed Jul 30, 2012
1 parent 23bd1ae commit 0b8f821
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 29 deletions.
6 changes: 0 additions & 6 deletions lib/wombat/dsl/iterator.rb
Expand Up @@ -2,8 +2,6 @@

module Wombat
module DSL
# Each iterator property keeps an array
# with the results of each iteration pass.
class Iterator < PropertyContainer
attr_accessor :name, :selector

Expand All @@ -19,10 +17,6 @@ def initialize(name, selector)
def format
:iterator
end

def reset
all_properties.each { |p| p.reset }
end
end
end
end
10 changes: 1 addition & 9 deletions lib/wombat/dsl/property.rb
@@ -1,7 +1,7 @@
module Wombat
module DSL
class Property
attr_accessor :name, :selector, :format, :namespaces, :callback, :result
attr_accessor :name, :selector, :format, :namespaces, :callback

# TODO: This class should receive method_name, args and block
# and do the assignment of properties itself, instead of receiving
Expand All @@ -13,14 +13,6 @@ def initialize(options)
@namespaces = options[:namespaces]
@callback = options[:callback]
end

def flatten(depth = nil)
depth ? result[depth] : result
end

def reset
@result = nil
end
end
end
end
12 changes: 0 additions & 12 deletions lib/wombat/dsl/property_container.rb
Expand Up @@ -45,18 +45,6 @@ def namespaces
# TODO: Called by NodeSelector. Fix this
nil
end

def all_properties
values.flat_map { |v|
if v.kind_of? PropertyContainer
v.all_properties
elsif v.kind_of? Property
v
else
nil
end
}.compact
end
end
end
end
2 changes: 0 additions & 2 deletions lib/wombat/property/locators/iterator.rb
Expand Up @@ -7,8 +7,6 @@ module Locators
class Iterator < Base
def locate
super do
@property.reset

locate_nodes.flat_map do |node|
Hash.new.tap do |h|
@property.values
Expand Down

0 comments on commit 0b8f821

Please sign in to comment.