Class: RLSM::RegExp::Star
Instance Method Summary collapse
- #empty? ⇒ Boolean
- #first ⇒ Object
- #follow ⇒ Object
-
#initialize(parent, str) ⇒ Star
constructor
A new instance of Star.
- #lambda? ⇒ Boolean
- #last ⇒ Object
- #null? ⇒ Boolean
- #to_s ⇒ Object
Constructor Details
#initialize(parent, str) ⇒ Star
Returns a new instance of Star.
272 273 274 275 |
# File 'lib/rlsm_regexp.rb', line 272 def initialize(parent, str) @parent = parent @child = NodeFactory.new_node(self, str[(0..-2)]) end |
Instance Method Details
#empty? ⇒ Boolean
314 315 316 |
# File 'lib/rlsm_regexp.rb', line 314 def empty? false end |
#first ⇒ Object
281 282 283 |
# File 'lib/rlsm_regexp.rb', line 281 def first @child.first end |
#follow ⇒ Object
289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/rlsm_regexp.rb', line 289 def follow res = @child.follow #Cross of last and first first.each do |f| last.each do |l| res << [l,f] end end res end |
#lambda? ⇒ Boolean
310 311 312 |
# File 'lib/rlsm_regexp.rb', line 310 def lambda? false end |
#last ⇒ Object
285 286 287 |
# File 'lib/rlsm_regexp.rb', line 285 def last @child.last end |
#null? ⇒ Boolean
277 278 279 |
# File 'lib/rlsm_regexp.rb', line 277 def null? true end |