Class: KQL::Selector

Inherits:
Object
  • Object
show all
Defined in:
lib/kql/selector.rb

Direct Known Subclasses

Combined

Defined Under Namespace

Classes: Combined

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(filter) ⇒ Selector

Returns a new instance of Selector.



5
6
7
# File 'lib/kql/selector.rb', line 5

def initialize(filter)
  @filter = filter
end

Instance Attribute Details

#filterObject (readonly)

Returns the value of attribute filter.



3
4
5
# File 'lib/kql/selector.rb', line 3

def filter
  @filter
end

Instance Method Details

#==(other) ⇒ Object



9
10
11
12
13
# File 'lib/kql/selector.rb', line 9

def ==(other)
  return false unless other.class == Selector

  other.filter == filter
end

#execute(context) ⇒ Object



15
16
17
# File 'lib/kql/selector.rb', line 15

def execute(context)
  filter.execute(context)
end