Class: ActiveHash::Relation::WhereChain

Inherits:
Object
  • Object
show all
Defined in:
lib/active_hash/relation.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(relation) ⇒ WhereChain

Returns a new instance of WhereChain.



32
33
34
# File 'lib/active_hash/relation.rb', line 32

def initialize(relation)
  @relation = relation
end

Instance Attribute Details

#relationObject (readonly)

Returns the value of attribute relation.



30
31
32
# File 'lib/active_hash/relation.rb', line 30

def relation
  @relation
end

Instance Method Details

#not(conditions_hash) ⇒ Object



36
37
38
39
# File 'lib/active_hash/relation.rb', line 36

def not(conditions_hash)
  relation.conditions << Condition.new(conditions_hash).invert!
  relation
end