Class: Gamefic::Scope::Base
- Inherits:
-
Object
- Object
- Gamefic::Scope::Base
- Defined in:
- lib/gamefic/scope/base.rb
Overview
The base class for a Scoped query’s scope.
Instance Attribute Summary collapse
-
#context ⇒ Object
readonly
Returns the value of attribute context.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(context) ⇒ Base
constructor
A new instance of Base.
- #matches ⇒ Object
Constructor Details
#initialize(context) ⇒ Base
Returns a new instance of Base.
11 12 13 |
# File 'lib/gamefic/scope/base.rb', line 11 def initialize context @context = context end |
Instance Attribute Details
#context ⇒ Object (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
21 22 23 |
# File 'lib/gamefic/scope/base.rb', line 21 def self.matches context new(context).matches end |
.precision ⇒ Object
25 26 27 |
# File 'lib/gamefic/scope/base.rb', line 25 def self.precision 0 end |
Instance Method Details
#matches ⇒ Object
16 17 18 |
# File 'lib/gamefic/scope/base.rb', line 16 def matches [] end |