class SimpleDrilldown::Controller::ScopeHolder

Public Class Methods

new(scope) click to toggle source
# File lib/simple_drilldown/controller.rb, line 639
def initialize(scope)
  instance_eval(&scope)
end

Public Instance Methods

order(order) click to toggle source

def merge(scope)

@merged_scope = scope
self

end

def includes(includes)

@includes = includes
self

end

def references(references)

@references = references
self

end

# File lib/simple_drilldown/controller.rb, line 658
def order(order)
  @order = order
  self
end
to_s() click to toggle source
# File lib/simple_drilldown/controller.rb, line 667
def to_s
  if @order.is_a?(Hash)
    @order.map { |field, direction| "#{field} #{direction}" }.join(', ')
  else
    @order.to_s
  end
end
where(*_conditions) click to toggle source
# File lib/simple_drilldown/controller.rb, line 663
def where(*_conditions)
  self
end