module Grape::Entity::Condition
Public Class Methods
new_if(arg)
click to toggle source
# File lib/grape_entity/condition.rb, line 9 def self.new_if(arg) case arg when Hash then HashCondition.new false, arg when Proc then BlockCondition.new false, &arg when Symbol then SymbolCondition.new false, arg end end
new_unless(arg)
click to toggle source
# File lib/grape_entity/condition.rb, line 17 def self.new_unless(arg) case arg when Hash then HashCondition.new true, arg when Proc then BlockCondition.new true, &arg when Symbol then SymbolCondition.new true, arg end end