Skip to content

Commit

Permalink
no need to make method_missing public
Browse files Browse the repository at this point in the history
  • Loading branch information
dnagir committed Dec 6, 2011
1 parent b5e5033 commit 0e06668
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions spec/query_spec.rb
Expand Up @@ -14,10 +14,6 @@ def to_query
}) })
end end


def method_missing(method, *args, &block)
add_path(method)
end

def execute! def execute!
q = self.to_query q = self.to_query
api = Morpheus::API.const_get(q.type.to_s.camelize).new api = Morpheus::API.const_get(q.type.to_s.camelize).new
Expand All @@ -26,6 +22,11 @@ def execute!


protected protected


def method_missing(method, *args, &block)
add_path(method)
end


def assemble_paths def assemble_paths
Kernel.raise "Nothing is defined for the query." if @paths.empty? Kernel.raise "Nothing is defined for the query." if @paths.empty?
@paths.map{|p| "-[:#{p}]->"}.join("()") @paths.map{|p| "-[:#{p}]->"}.join("()")
Expand Down

0 comments on commit 0e06668

Please sign in to comment.