Class: RBNF::Group

Inherits:
Unary
  • Object
show all
Defined in:
lib/rbnf/nodes.rb

Overview

Grouping node. Semantically identical to its child, but greatly simplifies stringification.

Constant Summary

Constants included from RBNF

DEFS, VERSION

Instance Attribute Summary

Attributes inherited from Unary

#a

Instance Method Summary collapse

Methods inherited from Unary

#initialize

Methods included from RBNF

#=~, [], #alt, #cat, #comps, def, define, dememoize, #except, #group, method_missing, #opt, #rep, #rep_n

Constructor Details

This class inherits a constructor from RBNF::Unary

Instance Method Details

#match(s) ⇒ Object



71
72
73
# File 'lib/rbnf/nodes.rb', line 71

def match(s)
  a=~s
end

#to_sObject



68
69
70
# File 'lib/rbnf/nodes.rb', line 68

def to_s
  "( #{a} )"
end