Class: HashProvider

Inherits:
EnumerableProvider show all
Defined in:
lib/providers/hash_provider.rb

Instance Method Summary collapse

Methods inherited from EnumerableProvider

#evaluate, #handle_group_by, #handle_order_by, #initialize

Constructor Details

This class inherits a constructor from EnumerableProvider

Instance Method Details

#handle_select(linq_exp, filtered_values) ⇒ Object



11
12
13
14
15
# File 'lib/providers/hash_provider.rb', line 11

def handle_select(linq_exp,filtered_values)
  filtered_values.lazy_map(&linq_exp.with_vars do |k,v|
    linq_exp.select.visit(EnumerableExpessionEvaluator.new(linq_exp))
  end)
end

#handle_where(linq_exp) ⇒ Object



5
6
7
8
9
# File 'lib/providers/hash_provider.rb', line 5

def handle_where(linq_exp)
  filtered_values = @enumerable.lazy_select(&linq_exp.with_vars do|k,v| 
    linq_exp.where.visit(EnumerableExpessionEvaluator.new(linq_exp))
  end)
end