Class: Stupidedi::Parser::InitialState
Instance Attribute Summary collapse
Class Method Summary
collapse
Instance Method Summary
collapse
#leaf?, lsequence, mkcomposite, mkelement, mkrepeated, mksegment, mksimple, #pretty_print, push, sequence, tsequence
Methods included from Inspect
#inspect
Constructor Details
#initialize(separators, segment_dict, instructions, zipper, children) ⇒ InitialState
Returns a new instance of InitialState.
22
23
24
25
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 22
def initialize(separators, segment_dict, instructions, zipper, children)
@separators, @segment_dict, @instructions, @zipper, @children =
separators, segment_dict, instructions, zipper, children
end
|
Instance Attribute Details
20
21
22
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 20
def children
@children
end
|
14
15
16
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 14
def instructions
@instructions
end
|
11
12
13
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 11
def segment_dict
@segment_dict
end
|
8
9
10
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 8
def separators
@separators
end
|
17
18
19
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 17
def zipper
@zipper
end
|
Class Method Details
57
58
59
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 57
def start(zipper)
zipper.build(build(zipper))
end
|
Instance Method Details
28
29
30
31
32
33
34
35
|
# File 'lib/stupidedi/parser/states/initial_state.rb', line 28
def copy(changes = {})
InitialState.new \
changes.fetch(:separators, @separators),
changes.fetch(:segment_dict, @segment_dict),
changes.fetch(:instructions, @instructions),
changes.fetch(:zipper, @zipper),
changes.fetch(:children, @children)
end
|