Module: Grape::Entity::Condition

Defined in:
lib/grape_entity/condition.rb,
lib/grape_entity/condition/base.rb,
lib/grape_entity/condition/hash_condition.rb,
lib/grape_entity/condition/block_condition.rb,
lib/grape_entity/condition/symbol_condition.rb

Defined Under Namespace

Classes: Base, BlockCondition, HashCondition, SymbolCondition

Class Method Summary collapse

Class Method Details

.new_if(arg) ⇒ Object



12
13
14
# File 'lib/grape_entity/condition.rb', line 12

def new_if(arg)
  condition(false, arg)
end

.new_unless(arg) ⇒ Object



16
17
18
# File 'lib/grape_entity/condition.rb', line 16

def new_unless(arg)
  condition(true, arg)
end