Class: Arspy::Operators::Selector::StringSelector

Inherits:
Base
  • Object
show all
Defined in:
lib/arspy/operators/selector/string_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)


5
6
7
# File 'lib/arspy/operators/selector/string_selector.rb', line 5

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

Instance Method Details

#select?(obj) ⇒ Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/arspy/operators/selector/string_selector.rb', line 8

def select?(obj)
  obj.instance_eval { @argument }
end