Method: Ion::Scope#initialize

Defined in:
lib/ion/scope.rb

#initialize(search, args = {}, &blk) ⇒ Scope

Returns a new instance of Scope.

Raises:



6
7
8
9
10
11
12
13
14
15
# File 'lib/ion/scope.rb', line 6

def initialize(search, args={}, &blk)
  @search  = search
  @gate    = args[:gate]  || :all
  @score   = args[:score] || 1.0
  @type    = :z # or :l

  yieldie(&blk) and done  if block_given?

  raise Ion::Error  unless [:all, :any].include?(@gate)
end