Class: Stupidedi::Builder::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.
23
24
25
26
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 23
def initialize(separators, segment_dict, instructions, zipper, children)
@separators, @segment_dict, @instructions, @zipper, @children =
separators, segment_dict, instructions, zipper, children
end
|
Instance Attribute Details
21
22
23
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 21
def children
@children
end
|
15
16
17
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 15
def instructions
@instructions
end
|
12
13
14
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 12
def segment_dict
@segment_dict
end
|
9
10
11
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 9
def separators
@separators
end
|
18
19
20
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 18
def zipper
@zipper
end
|
Class Method Details
59
60
61
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 59
def start
Zipper.build(build)
end
|
Instance Method Details
29
30
31
32
33
34
35
36
|
# File 'lib/stupidedi/builder/states/initial_state.rb', line 29
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
|