Module: Hx::Path::Selector

Included in:
All, AssumeCircumfix, Connective, ElideCircumfix, Negation, Pattern
Defined in:
lib/hx/path.rb

Instance Method Summary collapse

Instance Method Details

#&(other) ⇒ Object



40
41
42
# File 'lib/hx/path.rb', line 40

def &(other)
  Conjunction.build(self, other)
end

#accept_path?(path) ⇒ Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


28
29
30
# File 'lib/hx/path.rb', line 28

def accept_path?(path)
  raise NotImplementedError, "#{self.class}#accept_path? not implemented"
end

#assume_circumfix(prefix, suffix) ⇒ Object



48
49
50
# File 'lib/hx/path.rb', line 48

def assume_circumfix(prefix, suffix)
  AssumeCircumfix.build(self, prefix, suffix)
end

#elide_circumfix(prefix, suffix) ⇒ Object



52
53
54
# File 'lib/hx/path.rb', line 52

def elide_circumfix(prefix, suffix)
  ElideCircumfix.build(self, prefix, suffix)
end

#literal?Boolean

Returns:

  • (Boolean)


32
33
34
# File 'lib/hx/path.rb', line 32

def literal?
  false
end

#|(other) ⇒ Object



36
37
38
# File 'lib/hx/path.rb', line 36

def |(other)
  Disjunction.build(self, other)
end

#~Object



44
45
46
# File 'lib/hx/path.rb', line 44

def ~()
  Negation.build(self)
end