Class: Scim::Kit::V2::Filter::Node

Inherits:
Object
  • Object
show all
Defined in:
lib/scim/kit/v2/filter/node.rb

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Node

Returns a new instance of Node.



11
12
13
# File 'lib/scim/kit/v2/filter/node.rb', line 11

def initialize(hash)
  @hash = hash
end

Instance Method Details

#accept(visitor) ⇒ Object



31
32
33
# File 'lib/scim/kit/v2/filter/node.rb', line 31

def accept(visitor)
  visitor.visit(self)
end

#attributeObject



19
20
21
# File 'lib/scim/kit/v2/filter/node.rb', line 19

def attribute
  self[:attribute].to_s
end

#inspectObject



43
44
45
# File 'lib/scim/kit/v2/filter/node.rb', line 43

def inspect
  @hash.inspect
end

#leftObject



35
36
37
# File 'lib/scim/kit/v2/filter/node.rb', line 35

def left
  self.class.new(self[:left])
end

#not?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/scim/kit/v2/filter/node.rb', line 27

def not?
  @hash.key?(:not)
end

#operatorObject



15
16
17
# File 'lib/scim/kit/v2/filter/node.rb', line 15

def operator
  self[:operator].to_sym
end

#rightObject



39
40
41
# File 'lib/scim/kit/v2/filter/node.rb', line 39

def right
  self.class.new(self[:right])
end

#valueObject



23
24
25
# File 'lib/scim/kit/v2/filter/node.rb', line 23

def value
  self[:value].to_s[1..-2]
end