Class: Predicated::TreetopUrlPart::ParensNode

Inherits:
Treetop::Runtime::SyntaxNode
  • Object
show all
Defined in:
lib/predicated/from/url_part.rb

Instance Method Summary collapse

Instance Method Details

#innerObject



94
# File 'lib/predicated/from/url_part.rb', line 94

def inner; elements[2] end

#not?Boolean

Returns:

  • (Boolean)


95
# File 'lib/predicated/from/url_part.rb', line 95

def not?; elements[0].text_value=="!" end

#to_predicateObject



97
98
99
100
# File 'lib/predicated/from/url_part.rb', line 97

def to_predicate
  inner_predicate = inner.to_predicate
  not? ? Not.new(inner_predicate) : inner_predicate
end