Class: Arspy::Operators::Selector::IntegerSelector

Inherits:
Base
  • Object
show all
Defined in:
lib/arspy/operators/selector/integer_selector.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Arspy::Operators::Selector::Base

Class Method Details

.applies?(arg) ⇒ Boolean

Returns:

  • (Boolean)


6
7
8
# File 'lib/arspy/operators/selector/integer_selector.rb', line 6

def self.applies?(arg)
  arg.is_a? Integer
end

Instance Method Details

#select?(obj) ⇒ Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/arspy/operators/selector/integer_selector.rb', line 10

def select?(obj)
  obj.id == @argument
end