Class: Gamefic::Query::Matches

Inherits:
Object
  • Object
show all
Defined in:
lib/gamefic/query/matches.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(objects, matching, remaining) ⇒ Matches

Returns a new instance of Matches.



6
7
8
9
10
# File 'lib/gamefic/query/matches.rb', line 6

def initialize objects, matching, remaining
  @objects = objects
  @matching = matching
  @remaining = remaining
end

Instance Attribute Details

#matchingObject

Returns the value of attribute matching.



4
5
6
# File 'lib/gamefic/query/matches.rb', line 4

def matching
  @matching
end

#objectsObject

Returns the value of attribute objects.



4
5
6
# File 'lib/gamefic/query/matches.rb', line 4

def objects
  @objects
end

#remainingObject

Returns the value of attribute remaining.



4
5
6
# File 'lib/gamefic/query/matches.rb', line 4

def remaining
  @remaining
end

Class Method Details

.execute(objects, description, continued: false) ⇒ Object



12
13
14
15
16
17
18
# File 'lib/gamefic/query/matches.rb', line 12

def self.execute objects, description, continued: false
  if continued
    match_with_remainder objects, description
  else
    match_without_remainder objects, description
  end
end