Class: Gamefic::Scope::Base

Inherits:
Object
  • Object
show all
Defined in:
lib/gamefic/scope/base.rb

Overview

The base class for a Scoped query’s scope.

Direct Known Subclasses

Children, Descendants, Family, Myself, Parent, Siblings

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(context) ⇒ Base

Returns a new instance of Base.

Parameters:



11
12
13
# File 'lib/gamefic/scope/base.rb', line 11

def initialize context
  @context = context
end

Instance Attribute Details

#contextObject (readonly)

Returns the value of attribute context.



8
9
10
# File 'lib/gamefic/scope/base.rb', line 8

def context
  @context
end

Class Method Details

.matches(context) ⇒ Object

Parameters:



21
22
23
# File 'lib/gamefic/scope/base.rb', line 21

def self.matches context
  new(context).matches
end

.precisionObject



25
26
27
# File 'lib/gamefic/scope/base.rb', line 25

def self.precision
  0
end

Instance Method Details

#matchesObject

Parameters:



16
17
18
# File 'lib/gamefic/scope/base.rb', line 16

def matches
  []
end