cauldron 0.1.5 → 0.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +4 -1
  3. data/.rspec +1 -0
  4. data/Gemfile +16 -9
  5. data/Gemfile.lock +134 -64
  6. data/README.md +26 -0
  7. data/Rakefile +24 -99
  8. data/build_sandbox.rb +41 -0
  9. data/cucumber.yml +8 -0
  10. data/features/chop.feature +23 -0
  11. data/features/create_dynamic_statements.feature +14 -0
  12. data/features/generate_known_solution.feature +42 -0
  13. data/features/generate_new_statement.feature +20 -0
  14. data/features/step_definitions/cauldron_steps.rb +47 -0
  15. data/features/support/env.rb +1 -1
  16. data/features/use_existing_statements.feature +23 -0
  17. data/lib/cauldron.rb +41 -5
  18. data/lib/cauldron/actualized_composite.rb +35 -0
  19. data/lib/cauldron/array_collect_template/default.rb +95 -0
  20. data/lib/cauldron/array_collect_template/template.rb +57 -0
  21. data/lib/cauldron/builder.rb +60 -0
  22. data/lib/cauldron/caret.rb +50 -0
  23. data/lib/cauldron/dynamic_operator.rb +90 -0
  24. data/lib/cauldron/dynamic_operator_module.rb +140 -0
  25. data/lib/cauldron/example.rb +18 -0
  26. data/lib/cauldron/example_set.rb +36 -0
  27. data/lib/cauldron/histories.rb +53 -0
  28. data/lib/cauldron/history.rb +34 -0
  29. data/lib/cauldron/if_relationship.rb +4 -6
  30. data/lib/cauldron/number_addition_template/add_five.rb +71 -0
  31. data/lib/cauldron/number_addition_template/template.rb +56 -0
  32. data/lib/cauldron/operator.rb +62 -0
  33. data/lib/cauldron/operator/array_reverse_operator.rb +160 -0
  34. data/lib/cauldron/operator/concat_operator.rb +72 -0
  35. data/lib/cauldron/operator/hash_key_value_operator.rb +74 -0
  36. data/lib/cauldron/operator/numeric_operator.rb +115 -0
  37. data/lib/cauldron/operator/string_asterisk_operator.rb +131 -0
  38. data/lib/cauldron/operator/to_s_operator.rb +18 -0
  39. data/lib/cauldron/operator/var_collect_operator.rb +29 -0
  40. data/lib/cauldron/pot.rb +136 -26
  41. data/lib/cauldron/scope.rb +24 -0
  42. data/lib/cauldron/solution/composite.rb +236 -0
  43. data/lib/cauldron/solution/one.rb +49 -0
  44. data/lib/cauldron/statement_generator.rb +298 -0
  45. data/lib/cauldron/template_base.rb +14 -0
  46. data/lib/cauldron/tracer.rb +55 -0
  47. data/lib/cauldron/version.rb +1 -1
  48. data/lib/pry_tester.rb +76 -0
  49. data/ruby_to_sexp.rb +74 -0
  50. data/sandbox.rb +7 -0
  51. data/sexp_to_ruby.rb +150 -0
  52. data/spec/cauldron/actualized_composite_spec.rb +140 -0
  53. data/spec/cauldron/array_collect_template/default_spec.rb +41 -0
  54. data/spec/cauldron/builder_spec.rb +186 -0
  55. data/spec/cauldron/dynamic/add_number_template_spec.rb +30 -0
  56. data/spec/cauldron/dynamic_operator_spec.rb +416 -0
  57. data/spec/cauldron/example_set_spec.rb +49 -0
  58. data/spec/cauldron/example_spec.rb +33 -0
  59. data/spec/cauldron/histories_spec.rb +135 -0
  60. data/spec/cauldron/history_spec.rb +118 -0
  61. data/spec/cauldron/if_relationship_spec.rb +1 -1
  62. data/spec/cauldron/operator/array_reverse_operator_spec.rb +73 -0
  63. data/spec/cauldron/{concat_operator_spec.rb → operator/concat_operator_spec.rb} +30 -12
  64. data/spec/cauldron/operator/hash_key_value_operator_spec.rb +98 -0
  65. data/spec/cauldron/operator/numeric_operator_spec.rb +110 -0
  66. data/spec/cauldron/operator/string_asterisk_operator_spec.rb +196 -0
  67. data/spec/cauldron/operator/var_collect_operator_spec.rb +38 -0
  68. data/spec/cauldron/pot_spec.rb +176 -14
  69. data/spec/cauldron/solution/composite_spec.rb +421 -0
  70. data/spec/cauldron/solution/one_spec.rb +24 -0
  71. data/spec/cauldron/statement_generator_spec.rb +211 -0
  72. data/spec/cauldron/terminal_spec.rb +2 -2
  73. data/spec/spec_helper.rb +5 -1
  74. data/spec/support/code_matcher.rb +55 -0
  75. data/spec/support/include_instance_of_matcher.rb +9 -0
  76. data/spec/support/shared_examples_for_leaf_operators.rb +22 -0
  77. data/spec/support/shared_examples_for_operators.rb +23 -0
  78. data/syntax_spec.txt +2 -0
  79. metadata +104 -41
  80. data/README +0 -1
  81. data/README.rdoc +0 -19
  82. data/VERSION +0 -1
  83. data/features/cauldron_new_approach.feature +0 -46
  84. data/lib/cauldron/array_reverse_operator.rb +0 -39
  85. data/lib/cauldron/concat_operator.rb +0 -34
  86. data/lib/cauldron/numeric_operator.rb +0 -45
  87. data/lib/cauldron/relationship.rb +0 -5
  88. data/spec/cauldron/array_reverse_operator_spec.rb +0 -59
  89. data/spec/cauldron/numeric_operator_spec.rb +0 -70
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: dedfa4647815accc4eb122bd68da99c45587899f
4
+ data.tar.gz: de6686c30eb37dba7ee69436b92feb8dccbd4b28
5
+ SHA512:
6
+ metadata.gz: 6c768e91f010f80cca34b5fe4f5b09c50fc83c38326afabb34d696dcb3ab04210d15f2019e68759508f69c6ad54062caf8083a9f216a596b4a20d3a10a55c811
7
+ data.tar.gz: 4506c6030f20854024b7198b6a96be9d3625201022e664c77a3941ab1205d20d1375ba0cfee37717bb48374b6f8313966cdc4e33b2b0c35e75a81fc8eb5fbd04
data/.gitignore CHANGED
@@ -27,7 +27,7 @@ pkg
27
27
  #
28
28
  # For MacOS:
29
29
  #
30
- #.DS_Store
30
+ .DS_Store
31
31
 
32
32
  # For TextMate
33
33
  #*.tmproj
@@ -49,3 +49,6 @@ pkg
49
49
 
50
50
  # For Eclipse/Aptana
51
51
  .project
52
+
53
+ tmp
54
+ NOTES.txt
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
- source "http://rubygems.org"
1
+ source "https://rubygems.org"
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
4
  # gem "activesupport", ">= 2.3.5"
@@ -7,19 +7,26 @@ source "http://rubygems.org"
7
7
  #require 'rubygems'
8
8
  #require 'lib/cauldron'
9
9
 
10
+ gem 'activesupport'
11
+
10
12
  # Add dependencies to develop your gem here.
11
13
  # Include everything needed to run rake, tests, features, etc.
12
14
  group :development, :cucumber, :test do
13
15
  #gem "shoulda", ">= 0"
14
16
  #gem "bundler", "~> 1.0.15"
15
- gem "jeweler", "~> 1.6.2"
16
- gem "rspec", "~>2.6.0"
17
- gem "rcov", ">= 0"
18
- gem "ruby_parser", "~>2.0.6"
19
- gem "aruba", "~>0.4.5"
17
+ gem "jeweler"
18
+ gem "rspec"
19
+ gem 'simplecov', :require => false
20
+ gem "ruby_parser"
21
+ gem 'aruba', '~> 0.14.6'
20
22
  #gem 'ruby-debug', '0.10.4'
21
- gem 'debugger'
22
- gem 'pry'
23
+ #gem 'pry'
23
24
  end
24
25
 
25
- gem "ruby2ruby", "~>1.2.5"
26
+ # http://rubytree.anupamsg.me
27
+ gem 'tree'
28
+
29
+ gem 'pry', '~> 0.10.2'
30
+
31
+ gem 'ruby2ruby', '~> 2.3'
32
+ gem 'sorcerer', '~> 1.0.2'
@@ -1,76 +1,146 @@
1
1
  GEM
2
- remote: http://rubygems.org/
2
+ remote: https://rubygems.org/
3
3
  specs:
4
- aruba (0.4.5)
5
- bcat (>= 0.6.1)
6
- childprocess (>= 0.1.9)
7
- cucumber (>= 0.10.7)
8
- rdiscount (>= 1.6.8)
9
- rspec (>= 2.6.0)
10
- bcat (0.6.1)
11
- rack (~> 1.0)
12
- builder (3.0.0)
13
- childprocess (0.2.2)
14
- ffi (~> 1.0.6)
15
- coderay (1.1.0)
16
- columnize (0.3.6)
17
- cucumber (1.1.0)
4
+ activesupport (5.2.3)
5
+ concurrent-ruby (~> 1.0, >= 1.0.2)
6
+ i18n (>= 0.7, < 2)
7
+ minitest (~> 5.1)
8
+ tzinfo (~> 1.1)
9
+ addressable (2.4.0)
10
+ aruba (0.14.11)
11
+ childprocess (>= 0.6.3, < 3.0.0)
12
+ contracts (~> 0.9)
13
+ cucumber (>= 1.3.19)
14
+ ffi (~> 1.9)
15
+ rspec-expectations (>= 2.99)
16
+ thor (~> 0.19)
17
+ backports (3.15.0)
18
+ builder (3.2.3)
19
+ childprocess (2.0.0)
20
+ rake (< 13.0)
21
+ coderay (1.1.2)
22
+ concurrent-ruby (1.1.5)
23
+ contracts (0.16.0)
24
+ cucumber (3.1.2)
18
25
  builder (>= 2.1.2)
19
- diff-lcs (>= 1.1.2)
20
- gherkin (~> 2.5.0)
21
- json (>= 1.4.6)
22
- term-ansicolor (>= 1.0.6)
23
- debugger (1.6.5)
24
- columnize (>= 0.3.1)
25
- debugger-linecache (~> 1.2.0)
26
- debugger-ruby_core_source (~> 1.3.1)
27
- debugger-linecache (1.2.0)
28
- debugger-ruby_core_source (1.3.2)
29
- diff-lcs (1.1.2)
30
- ffi (1.0.9)
31
- gherkin (2.5.1)
32
- json (>= 1.4.6)
33
- git (1.2.5)
34
- jeweler (1.6.2)
35
- bundler (~> 1.0)
26
+ cucumber-core (~> 3.2.0)
27
+ cucumber-expressions (~> 6.0.1)
28
+ cucumber-wire (~> 0.0.1)
29
+ diff-lcs (~> 1.3)
30
+ gherkin (~> 5.1.0)
31
+ multi_json (>= 1.7.5, < 2.0)
32
+ multi_test (>= 0.1.2)
33
+ cucumber-core (3.2.1)
34
+ backports (>= 3.8.0)
35
+ cucumber-tag_expressions (~> 1.1.0)
36
+ gherkin (~> 5.0)
37
+ cucumber-expressions (6.0.1)
38
+ cucumber-tag_expressions (1.1.1)
39
+ cucumber-wire (0.0.1)
40
+ descendants_tracker (0.0.4)
41
+ thread_safe (~> 0.3, >= 0.3.1)
42
+ diff-lcs (1.3)
43
+ docile (1.3.2)
44
+ faraday (0.9.2)
45
+ multipart-post (>= 1.2, < 3)
46
+ ffi (1.11.1)
47
+ gherkin (5.1.0)
48
+ git (1.5.0)
49
+ github_api (0.16.0)
50
+ addressable (~> 2.4.0)
51
+ descendants_tracker (~> 0.0.4)
52
+ faraday (~> 0.8, < 0.10)
53
+ hashie (>= 3.4)
54
+ mime-types (>= 1.16, < 3.0)
55
+ oauth2 (~> 1.0)
56
+ hashie (3.6.0)
57
+ highline (2.0.2)
58
+ i18n (1.6.0)
59
+ concurrent-ruby (~> 1.0)
60
+ jeweler (2.3.9)
61
+ builder
62
+ bundler
36
63
  git (>= 1.2.5)
64
+ github_api (~> 0.16.0)
65
+ highline (>= 1.6.15)
66
+ nokogiri (>= 1.5.10)
67
+ psych
37
68
  rake
38
- json (1.6.1)
69
+ rdoc
70
+ semver2
71
+ json (2.2.0)
72
+ jwt (2.2.1)
39
73
  method_source (0.8.2)
40
- pry (0.9.12.6)
41
- coderay (~> 1.0)
42
- method_source (~> 0.8)
74
+ mime-types (2.99.3)
75
+ mini_portile2 (2.4.0)
76
+ minitest (5.11.3)
77
+ multi_json (1.13.1)
78
+ multi_test (0.1.2)
79
+ multi_xml (0.6.0)
80
+ multipart-post (2.1.1)
81
+ nokogiri (1.10.4)
82
+ mini_portile2 (~> 2.4.0)
83
+ oauth2 (1.4.1)
84
+ faraday (>= 0.8, < 0.16.0)
85
+ jwt (>= 1.0, < 3.0)
86
+ multi_json (~> 1.3)
87
+ multi_xml (~> 0.5)
88
+ rack (>= 1.2, < 3)
89
+ pry (0.10.4)
90
+ coderay (~> 1.1.0)
91
+ method_source (~> 0.8.1)
43
92
  slop (~> 3.4)
44
- rack (1.3.4)
45
- rake (0.9.2)
46
- rcov (0.9.9)
47
- rdiscount (1.6.8)
48
- rspec (2.6.0)
49
- rspec-core (~> 2.6.0)
50
- rspec-expectations (~> 2.6.0)
51
- rspec-mocks (~> 2.6.0)
52
- rspec-core (2.6.3)
53
- rspec-expectations (2.6.0)
54
- diff-lcs (~> 1.1.2)
55
- rspec-mocks (2.6.0)
56
- ruby2ruby (1.2.5)
57
- ruby_parser (~> 2.0)
58
- sexp_processor (~> 3.0)
59
- ruby_parser (2.0.6)
60
- sexp_processor (~> 3.0)
61
- sexp_processor (3.0.5)
62
- slop (3.4.7)
63
- term-ansicolor (1.0.6)
93
+ psych (3.1.0)
94
+ rack (2.0.7)
95
+ rake (12.3.3)
96
+ rdoc (6.1.1)
97
+ rspec (3.8.0)
98
+ rspec-core (~> 3.8.0)
99
+ rspec-expectations (~> 3.8.0)
100
+ rspec-mocks (~> 3.8.0)
101
+ rspec-core (3.8.2)
102
+ rspec-support (~> 3.8.0)
103
+ rspec-expectations (3.8.4)
104
+ diff-lcs (>= 1.2.0, < 2.0)
105
+ rspec-support (~> 3.8.0)
106
+ rspec-mocks (3.8.1)
107
+ diff-lcs (>= 1.2.0, < 2.0)
108
+ rspec-support (~> 3.8.0)
109
+ rspec-support (3.8.2)
110
+ ruby2ruby (2.4.3)
111
+ ruby_parser (~> 3.1)
112
+ sexp_processor (~> 4.6)
113
+ ruby_parser (3.13.1)
114
+ sexp_processor (~> 4.9)
115
+ semver2 (3.4.2)
116
+ sexp_processor (4.12.1)
117
+ simplecov (0.17.0)
118
+ docile (~> 1.1)
119
+ json (>= 1.8, < 3)
120
+ simplecov-html (~> 0.10.0)
121
+ simplecov-html (0.10.2)
122
+ slop (3.6.0)
123
+ sorcerer (1.0.2)
124
+ thor (0.20.3)
125
+ thread_safe (0.3.6)
126
+ tree (0.2.1)
127
+ tzinfo (1.2.5)
128
+ thread_safe (~> 0.1)
64
129
 
65
130
  PLATFORMS
66
131
  ruby
67
132
 
68
133
  DEPENDENCIES
69
- aruba (~> 0.4.5)
70
- debugger
71
- jeweler (~> 1.6.2)
72
- pry
73
- rcov
74
- rspec (~> 2.6.0)
75
- ruby2ruby (~> 1.2.5)
76
- ruby_parser (~> 2.0.6)
134
+ activesupport
135
+ aruba (~> 0.14.6)
136
+ jeweler
137
+ pry (~> 0.10.2)
138
+ rspec
139
+ ruby2ruby (~> 2.3)
140
+ ruby_parser
141
+ simplecov
142
+ sorcerer (~> 1.0.2)
143
+ tree
144
+
145
+ BUNDLED WITH
146
+ 1.16.1
@@ -0,0 +1,26 @@
1
+ [![Code Climate](https://codeclimate.com/github/theinbetweens/cauldron/badges/gpa.svg)](https://codeclimate.com/github/theinbetweens/cauldron)
2
+
3
+ [![Build Status](https://semaphoreci.com/api/v1/projects/68fafc64-3ef2-41f6-8936-d69d40e0fe2b/617362/badge.svg)](https://semaphoreci.com/theinbetweens/cauldron)
4
+
5
+ ## Usage
6
+
7
+ **Cauldron** can generate a very limited range of simple ruby functions to solve supplied problem. The following example will print the following ruby code.
8
+
9
+ ```ruby
10
+ def function(var0)
11
+ var0 + 1
12
+ end
13
+ ```
14
+
15
+ ```ruby
16
+ require 'cauldron'
17
+
18
+ pot = Cauldron::Pot.new
19
+ result = pot.solve(
20
+ [
21
+ {arguments: [7], response: 8},
22
+ {arguments: [10], response: 11}
23
+ ]
24
+ )
25
+ puts result
26
+ ```
data/Rakefile CHANGED
@@ -1,108 +1,33 @@
1
1
  # encoding: utf-8
2
2
 
3
- require "bundler/gem_tasks"
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ Bundler.setup
6
+ Bundler::GemHelper.install_tasks
4
7
 
5
- # require 'rubygems'
6
- # require 'bundler'
8
+ #require 'cucumber/rake/task'
9
+ #require "bundler/gem_tasks"
10
+ #require 'cucumber'
7
11
 
8
- # # => TODO This need to be above the bundler for some reason
9
- # require "rspec"
10
- # require "rspec/core/rake_task"
11
12
 
12
- # require 'lib/cauldron'
13
+ require 'rubygems'
14
+ require 'cucumber'
15
+ require 'cucumber/rake/task'
13
16
 
14
- # # => TODO Should check whether this needs to be here
15
- # begin
16
- # Bundler.setup(:default, :development)
17
- # rescue Bundler::BundlerError => e
18
- # $stderr.puts e.message
19
- # $stderr.puts "Run `bundle install` to install missing gems"
20
- # exit e.status_code
21
- # end
17
+ # Copied - https://github.com/cucumber/aruba/blob/master/Rakefile
18
+ Cucumber::Rake::Task.new do |t|
19
+ t.cucumber_opts = ""
20
+ # t.cucumber_opts = "--format Cucumber::Pro --out cucumber-pro.log" if ENV['CUCUMBER_PRO_TOKEN']
21
+ t.cucumber_opts << "--format pretty"
22
+ end
22
23
 
23
- # require 'rake'
24
+ # https://www.relishapp.com/rspec/rspec-core/docs/command-line/rake-task
25
+ begin
26
+ require 'rspec/core/rake_task'
24
27
 
25
- # $LOAD_PATH << File.expand_path('../lib',__FILE__)
28
+ RSpec::Core::RakeTask.new(:spec)
26
29
 
27
- # load File.join(File.dirname(__FILE__), 'tasks', 'theory_tasks.rake')
28
-
29
- # require 'jeweler'
30
- # Jeweler::Tasks.new do |gem|
31
- # # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
32
- # gem.name = "cauldron"
33
- # gem.homepage = "http://github.com/theinbetweens/cauldron"
34
- # gem.license = "MIT"
35
- # gem.summary = %Q{Generate simple ruby methods from the input(s) and expected output}
36
- # gem.description = %Q{Cauldron generates a methd from a number of examples that describe the input and the expected output. It is still at a very early stage of development right now so you're unlikely to get much practical use out of it.}
37
- # gem.email = "warrensangster@yahoo.com"
38
- # gem.authors = ["Warren Sangster"]
39
- # gem.required_ruby_version = '>= 1.6.8'
40
- # # dependencies defined in Gemfile
41
- # end
42
- # Jeweler::RubygemsDotOrgTasks.new
43
-
44
- # # require 'rake/testtask'
45
- # # Rake::TestTask.new(:test) do |test|
46
- # # test.libs << 'lib' << 'test'
47
- # # test.pattern = 'test/**/test_*.rb'
48
- # # test.verbose = true
49
- # # end
50
-
51
- # # require 'rcov/rcovtask'
52
- # # Rcov::RcovTask.new do |test|
53
- # # #test.libs << 'test'
54
- # # #test.pattern = 'test/**/test_*.rb'
55
- # # test.libs << 'spec'
56
- # # test.pattern = 'spec/**/*.rb'
57
- # # test.verbose = true
58
- # # test.rcov_opts << '--exclude "gems/*"'
59
- # # end
60
-
61
- # #task :default => :test
62
-
63
- # require 'rake/rdoctask'
64
- # Rake::RDocTask.new do |rdoc|
65
- # version = File.exist?('VERSION') ? File.read('VERSION') : ""
66
-
67
- # rdoc.rdoc_dir = 'rdoc'
68
- # rdoc.title = "cauldron #{version}"
69
- # rdoc.rdoc_files.include('README*')
70
- # rdoc.rdoc_files.include('lib/**/*.rb')
71
- # end
72
-
73
- # # => http://pivotallabs.com/users/alex/blog/articles/1451-upgrading-your-rakefile-from-rspec-1-3-to-rspec-2
74
- # RSpec::Core::RakeTask.new(:core) do |spec|
75
- # spec.pattern = 'spec/cauldron/*_spec.rb'
76
- # spec.rspec_opts = ['--backtrace']
77
- # end
78
-
79
- # # RSpec::Core::RakeTask.new(:rcov) do |spec|
80
- # # spec.pattern = 'spec/cauldron/*_spec.rb'
81
- # # spec.rspec_opts = ['--backtrace']
82
- # # end
83
-
84
- # RSpec::Core::RakeTask.new(:coverage) do |t|
85
- # t.rcov = true
86
- # #t.rcov_opts = %q[--exclude "spec"]
87
- # t.verbose = true
88
- # end
89
-
90
- # # => =====================
91
-
92
- # # desc "Run all specs with rcov"
93
- # # RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t|
94
- # # t.rcov = true
95
- # # end
96
-
97
- # # => http://stackoverflow.com/questions/3058676/rcov-with-rspec-2
98
- # #require 'spec-core'
99
- # #require 'rubygems'
100
- # #require 'rspec'
101
- # #require 'rspec/core'
102
-
103
- # #
104
- # # desc "Run all specs with rcov"
105
- # # RSpec::Core::RakeTask.new(:rcov => spec_prereq) do |t|
106
- # # t.rcov = true
107
- # # t.rcov_opts = %w{--rails --exclude osx\/objc,gems\/,spec\/,features\/}
108
- # # end
30
+ task :default => :spec
31
+ rescue LoadError
32
+ # no rspec available
33
+ end
@@ -0,0 +1,41 @@
1
+ $LOAD_PATH.unshift File.expand_path('../lib',__FILE__)
2
+
3
+ require 'cauldron'
4
+
5
+ a = %q{
6
+ def function(var1)
7
+ var2 = var1.collect {|x| x + 2}
8
+ var3 = var2.collect {|x| x.to_s }
9
+ end
10
+ }
11
+
12
+ b = %q{
13
+ def function2(var1)
14
+ var2 = var1.collect do |x|
15
+ x + 2
16
+ end
17
+ var3 = var2.collect do |x|
18
+ x.to_s
19
+ end
20
+ end
21
+ }
22
+
23
+
24
+
25
+ sexp = Ripper::SexpBuilder.new(b).parse
26
+
27
+
28
+ [
29
+ [ArrayCollect.new, NumericOperator.new(2)]
30
+ [ArrayCollect.new, ToSOperator.new]
31
+ ]
32
+
33
+
34
+ a.build('var1')
35
+
36
+ build(name, next_element)
37
+ [:sdf, :dsfsd, next_element.build('x')]
38
+ end
39
+ a.build('var2')
40
+
41
+ build()