For example i've class like :
class QueryDSL
def initialize(&block)
instance_eval &block
end
def ==(value)
"bla bla '#{value}'"
end
def test(param)
param + param
end
end
and class Query like :
class Query
def self.where(&block)
QueryDSL.new(&block)
end
end
I suspect when execute :
Query.where{test == 9}
the output should be :
"bla bla 9 bla bla 9"
But i've got exception like :
`test': wrong number of arguments (0 for 1) (ArgumentError)
Is there any mistake from my code ? Thanks