Module: PgLtree::ScopedFor::InstanceMethods

Defined in:
lib/pg_ltree/scoped_for.rb

Overview

Define instance methods

Instance Method Summary collapse

Instance Method Details

#ltree_scopeObject

Get default scope of ltree

Returns:

  • current class


23
24
25
# File 'lib/pg_ltree/scoped_for.rb', line 23

def ltree_scope
  self.class.where *(ltree_scoped_for.map { |column| { column => public_send(column) } })
end