Module: Arspy::Operators::Selector

Defined in:
lib/arspy/operators/selector.rb,
lib/arspy/operators/selector/base.rb,
lib/arspy/operators/selector/hash_selector.rb,
lib/arspy/operators/selector/range_selector.rb,
lib/arspy/operators/selector/string_selector.rb,
lib/arspy/operators/selector/integer_selector.rb,
lib/arspy/operators/selector/attribute_selector.rb,
lib/arspy/operators/selector/unsupported_selector.rb

Defined Under Namespace

Classes: AttributeSelector, Base, HashSelector, IntegerSelector, RangeSelector, StringSelector, UnsupportedSelector

Constant Summary collapse

@@selector_classes =
[
  IntegerSelector,
  RangeSelector,
  StringSelector,
  HashSelector,
  UnsupportedSelector
]

Class Method Summary collapse

Class Method Details

.for(arg) ⇒ Object



21
22
23
# File 'lib/arspy/operators/selector.rb', line 21

def self.for(arg)
  @@selector_classes.detect{|klass| klass.applies?(arg)}.new(arg)
end