Class: FuPeg::Parser::CutPoint

Inherits:
Object
  • Object
show all
Defined in:
lib/fupeg/parser.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCutPoint

Returns a new instance of CutPoint.



87
88
89
90
# File 'lib/fupeg/parser.rb', line 87

def initialize
  @cut = nil
  @next = nil
end

Instance Attribute Details

#nextObject

Returns the value of attribute next.



85
86
87
# File 'lib/fupeg/parser.rb', line 85

def next
  @next
end

Instance Method Details

#can_continue?Boolean

Returns:

  • (Boolean)


97
98
99
# File 'lib/fupeg/parser.rb', line 97

def can_continue?
  @cut ? nil : true
end

#cut!Object



92
93
94
95
# File 'lib/fupeg/parser.rb', line 92

def cut!
  @next&.cut!
  @cut = true
end