caricature 0.3.1 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (129) hide show
  1. data/.gitignore +4 -0
  2. data/Rakefile +100 -0
  3. data/VERSION +1 -0
  4. data/caricature.gemspec +177 -0
  5. data/doc/Array.html +251 -0
  6. data/doc/Caricature/ArgumentRecording.html +366 -0
  7. data/doc/Caricature/ClrClassDescriptor.html +303 -0
  8. data/doc/Caricature/ClrClassMessenger.html +263 -0
  9. data/doc/Caricature/ClrInterfaceDescriptor.html +295 -0
  10. data/doc/Caricature/ClrInterfaceIsolator.html +365 -0
  11. data/doc/Caricature/ClrInterfaceMessenger.html +260 -0
  12. data/doc/Caricature/ClrIsolator.html +424 -0
  13. data/doc/Caricature/Expectation.html +549 -0
  14. data/doc/Caricature/ExpectationBuilder.html +308 -0
  15. data/doc/Caricature/ExpectationSyntax.html +438 -0
  16. data/doc/Caricature/Expectations.html +344 -0
  17. data/doc/Caricature/Interception/ClassMethods.html +246 -0
  18. data/doc/Caricature/Interception.html +416 -0
  19. data/doc/Caricature/Isolation.html +578 -0
  20. data/doc/Caricature/Isolator.html +519 -0
  21. data/doc/Caricature/MemberDescriptor.html +335 -0
  22. data/doc/Caricature/Messenger.html +335 -0
  23. data/doc/Caricature/MethodCallRecorder.html +440 -0
  24. data/doc/Caricature/MethodCallRecording.html +493 -0
  25. data/doc/Caricature/RubyIsolator.html +416 -0
  26. data/doc/Caricature/RubyMessenger.html +260 -0
  27. data/doc/Caricature/RubyObjectDescriptor.html +289 -0
  28. data/doc/Caricature/TypeDescriptor.html +378 -0
  29. data/doc/Caricature/Verification.html +443 -0
  30. data/doc/Caricature.html +358 -0
  31. data/doc/Class.html +287 -0
  32. data/doc/Hash.html +255 -0
  33. data/doc/Module.html +287 -0
  34. data/doc/Object.html +322 -0
  35. data/doc/README_markdown.html +241 -0
  36. data/doc/String.html +289 -0
  37. data/doc/System/String.html +289 -0
  38. data/doc/System/Type.html +289 -0
  39. data/doc/System.html +207 -0
  40. data/doc/created.rid +1 -0
  41. data/doc/images/brick.png +0 -0
  42. data/doc/images/brick_link.png +0 -0
  43. data/doc/images/bug.png +0 -0
  44. data/doc/images/bullet_black.png +0 -0
  45. data/doc/images/bullet_toggle_minus.png +0 -0
  46. data/doc/images/bullet_toggle_plus.png +0 -0
  47. data/doc/images/date.png +0 -0
  48. data/doc/images/find.png +0 -0
  49. data/doc/images/loadingAnimation.gif +0 -0
  50. data/doc/images/macFFBgHack.png +0 -0
  51. data/doc/images/package.png +0 -0
  52. data/doc/images/page_green.png +0 -0
  53. data/doc/images/page_white_text.png +0 -0
  54. data/doc/images/page_white_width.png +0 -0
  55. data/doc/images/plugin.png +0 -0
  56. data/doc/images/ruby.png +0 -0
  57. data/doc/images/tag_green.png +0 -0
  58. data/doc/images/wrench.png +0 -0
  59. data/doc/images/wrench_orange.png +0 -0
  60. data/doc/images/zoom.png +0 -0
  61. data/doc/index.html +312 -0
  62. data/doc/js/darkfish.js +116 -0
  63. data/doc/js/jquery.js +32 -0
  64. data/doc/js/quicksearch.js +114 -0
  65. data/doc/js/thickbox-compressed.js +10 -0
  66. data/doc/lib/caricature/clr/descriptor_rb.html +52 -0
  67. data/doc/lib/caricature/clr/isolation_rb.html +52 -0
  68. data/doc/lib/caricature/clr/isolator_rb.html +52 -0
  69. data/doc/lib/caricature/clr/messenger_rb.html +52 -0
  70. data/doc/lib/caricature/clr_rb.html +52 -0
  71. data/doc/lib/caricature/descriptor_rb.html +52 -0
  72. data/doc/lib/caricature/expectation_rb.html +52 -0
  73. data/doc/lib/caricature/isolation_rb.html +52 -0
  74. data/doc/lib/caricature/isolator_rb.html +52 -0
  75. data/doc/lib/caricature/messaging_rb.html +52 -0
  76. data/doc/lib/caricature/method_call_recorder_rb.html +52 -0
  77. data/doc/lib/caricature/verification_rb.html +52 -0
  78. data/doc/lib/caricature_rb.html +52 -0
  79. data/doc/lib/core_ext/array_rb.html +52 -0
  80. data/doc/lib/core_ext/class_rb.html +52 -0
  81. data/doc/lib/core_ext/core_ext_rb.html +52 -0
  82. data/doc/lib/core_ext/hash_rb.html +52 -0
  83. data/doc/lib/core_ext/module_rb.html +52 -0
  84. data/doc/lib/core_ext/object_rb.html +52 -0
  85. data/doc/lib/core_ext/string_rb.html +52 -0
  86. data/doc/lib/core_ext/system/string_rb.html +52 -0
  87. data/doc/lib/core_ext/system/type_rb.html +52 -0
  88. data/doc/rdoc.css +696 -0
  89. data/irb_init.rb +9 -0
  90. data/lib/bin/Workarounds.dll +0 -0
  91. data/lib/bin/Workarounds.pdb +0 -0
  92. data/lib/caricature/clr/descriptor.rb +55 -0
  93. data/lib/caricature/clr/isolation.rb +33 -0
  94. data/lib/caricature/clr/isolator.rb +112 -0
  95. data/lib/caricature/clr/messenger.rb +46 -0
  96. data/lib/caricature/clr.rb +6 -0
  97. data/lib/caricature/descriptor.rb +74 -0
  98. data/lib/caricature/expectation.rb +159 -0
  99. data/lib/caricature/isolation.rb +146 -0
  100. data/lib/caricature/isolator.rb +287 -0
  101. data/lib/caricature/messenger.rb +57 -0
  102. data/lib/caricature/method_call_recorder.rb +130 -0
  103. data/lib/caricature/verification.rb +43 -0
  104. data/lib/caricature.rb +11 -0
  105. data/lib/core_ext/array.rb +10 -0
  106. data/lib/core_ext/class.rb +15 -0
  107. data/lib/core_ext/core_ext.rb +8 -0
  108. data/lib/core_ext/hash.rb +13 -0
  109. data/lib/core_ext/module.rb +15 -0
  110. data/lib/core_ext/object.rb +19 -0
  111. data/lib/core_ext/string.rb +17 -0
  112. data/lib/core_ext/system/string.rb +21 -0
  113. data/lib/core_ext/system/type.rb +21 -0
  114. data/pkg/.gitignore +0 -0
  115. data/pkg/caricature-0.1.0.gem +0 -0
  116. data/spec/bacon_helper.rb +49 -3
  117. data/spec/bin/.gitignore +0 -0
  118. data/spec/core_ext_spec.rb +9 -0
  119. data/spec/descriptor_spec.rb +142 -0
  120. data/spec/expectation_spec.rb +11 -7
  121. data/spec/integration_spec.rb +94 -2
  122. data/spec/isolation_spec.rb +0 -42
  123. data/spec/isolator_spec.rb +72 -66
  124. data/spec/messaging_spec.rb +172 -0
  125. data/spec/method_call_spec.rb +21 -21
  126. data/spec/models/ClrModels.cs +185 -0
  127. data/spec/verification_spec.rb +1 -1
  128. data/workarounds/ReflectionHelper.cs +30 -0
  129. metadata +133 -2
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ bin/*
2
+ spec/bin/*.dll
3
+ spec/bin/*.pdb
4
+ .idea
data/Rakefile ADDED
@@ -0,0 +1,100 @@
1
+ require 'rubygems'
2
+ require 'ftools'
3
+ require 'rake/rdoctask'
4
+ require 'jeweler'
5
+
6
+ desc "The default task is to run all the specs"
7
+ task :default => [:clr_models, :spec]
8
+
9
+ desc "Runs all the specs"
10
+ task :spec do
11
+ system "ibacon #{Dir.glob('spec/**/*_spec.rb').join(' ')}"
12
+ end
13
+
14
+ namespace :spec do
15
+
16
+ desc "runs the specifications for the different classes"
17
+ task :unit do
18
+ specs = Dir.glob('spec/**/*_spec.rb').reject { |file| File..basename(file) == "integration_spec.rb" }
19
+ system "ibacon #{specs.join(' ')}"
20
+ end
21
+
22
+ desc "runs the integration tests"
23
+ task :integration do
24
+ system "ibacon spec/integration_spec.rb"
25
+ end
26
+ end
27
+
28
+ def csc
29
+ system "gmcs"
30
+ $?.pid.zero? ? "csc" : "gmcs"
31
+ end
32
+
33
+ desc "Compiles the clr models"
34
+ task :clr_models do
35
+ Dir.chdir(File.dirname(__FILE__))
36
+ files = Dir.glob("spec/models/*.cs").collect { |f| f.gsub(/\//, "\\") }.join(" ")
37
+ system "#{csc} /noconfig /target:library /debug+ /debug:full /out:spec\\bin\\ClrModels.dll #{files}"
38
+ end
39
+
40
+ desc "Compiles the CLR workarounds"
41
+ task :workarounds do
42
+ Dir.chdir(File.dirname(__FILE__))
43
+ files = Dir.glob("workarounds/*.cs").collect { |f| f.gsub(/\//, "\\") }.join(" ")
44
+ system "#{csc} /noconfig /target:library /debug+ /debug:full /out:lib\\bin\\Workarounds.dll #{files}"
45
+ end
46
+
47
+ file_list = Dir.glob("lib/**/*.rb")
48
+
49
+ desc "Create RDoc documentation"
50
+ file 'doc/index.html' => file_list do
51
+ puts "######## Creating RDoc documentation"
52
+ system "rdoc --title 'Caricature isolation framework documentation' -m README README.markdown lib/"
53
+ end
54
+
55
+ desc "An alias for creating the RDoc documentation"
56
+ task :rdoc do
57
+ Rake::Task['doc/index.html'].invoke
58
+ end
59
+
60
+ begin
61
+
62
+ Jeweler::Tasks.new do |gemspec|
63
+ gemspec.name = "caricature"
64
+ gemspec.summary = "Caricature - Bringing simple mocking to the DLR"
65
+ gemspec.email = "ivan@flanders.co.nz"
66
+ gemspec.homepage = "http://github.com/casualjim/caricature"
67
+ gemspec.description = "This project aims to make interop between IronRuby objects and .NET objects easier. The idea is that it integrates nicely with bacon and later rspec and that it transparently lets you mock ironruby ojbects as well as CLR objects/interfaces. Caricature handles interfaces, interface inheritance, CLR objects, CLR object instances, Ruby classes and instances of Ruby classes."
68
+ gemspec.authors = ["Ivan Porto Carrero"]
69
+ gemspec.rubyforge_project = 'caricature' # This line would be new
70
+ end
71
+ rescue LoadError
72
+ puts "Jeweler not available. Install it with: sudo gem install technicalpickles-jeweler -s http://gems.github.com"
73
+ end
74
+
75
+ begin
76
+ require 'rake/contrib/sshpublisher'
77
+ namespace :rubyforge do
78
+
79
+ desc "Release gem and RDoc documentation to RubyForge"
80
+ task :release => ["rubyforge:release:gem", 'rubyforge:release:docs']
81
+
82
+ namespace :release do
83
+ desc "Publish RDoc to RubyForge."
84
+ task :docs => [:rdoc] do
85
+ config = YAML.load(
86
+ File.read(File.expand_path('~/.rubyforge/user-config.yml'))
87
+ )
88
+
89
+ host = "#{config['username']}@rubyforge.org"
90
+ remote_dir = "/var/www/gforge-projects/caricature/"
91
+ local_dir = 'doc'
92
+
93
+ Rake::SshDirPublisher.new(host, remote_dir, local_dir).upload
94
+ end
95
+ end
96
+ end
97
+ rescue LoadError
98
+ puts "Rake SshDirPublisher is unavailable or your rubyforge environment is not configured."
99
+ end
100
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.5.0
@@ -0,0 +1,177 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{caricature}
5
+ s.version = "0.5.0"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Ivan Porto Carrero"]
9
+ s.date = %q{2009-05-19}
10
+ s.description = %q{This project aims to make interop between IronRuby objects and .NET objects easier. The idea is that it integrates nicely with bacon and later rspec and that it transparently lets you mock ironruby ojbects as well as CLR objects/interfaces. Caricature handles interfaces, interface inheritance, CLR objects, CLR object instances, Ruby classes and instances of Ruby classes.}
11
+ s.email = %q{ivan@flanders.co.nz}
12
+ s.extra_rdoc_files = [
13
+ "README.markdown"
14
+ ]
15
+ s.files = [
16
+ ".gitignore",
17
+ "README.markdown",
18
+ "Rakefile",
19
+ "VERSION",
20
+ "caricature.gemspec",
21
+ "doc/Array.html",
22
+ "doc/Caricature.html",
23
+ "doc/Caricature/ArgumentRecording.html",
24
+ "doc/Caricature/ClrClassDescriptor.html",
25
+ "doc/Caricature/ClrClassMessenger.html",
26
+ "doc/Caricature/ClrInterfaceDescriptor.html",
27
+ "doc/Caricature/ClrInterfaceIsolator.html",
28
+ "doc/Caricature/ClrInterfaceMessenger.html",
29
+ "doc/Caricature/ClrIsolator.html",
30
+ "doc/Caricature/Expectation.html",
31
+ "doc/Caricature/ExpectationBuilder.html",
32
+ "doc/Caricature/ExpectationSyntax.html",
33
+ "doc/Caricature/Expectations.html",
34
+ "doc/Caricature/Interception.html",
35
+ "doc/Caricature/Interception/ClassMethods.html",
36
+ "doc/Caricature/Isolation.html",
37
+ "doc/Caricature/Isolator.html",
38
+ "doc/Caricature/MemberDescriptor.html",
39
+ "doc/Caricature/Messenger.html",
40
+ "doc/Caricature/MethodCallRecorder.html",
41
+ "doc/Caricature/MethodCallRecording.html",
42
+ "doc/Caricature/RubyIsolator.html",
43
+ "doc/Caricature/RubyMessenger.html",
44
+ "doc/Caricature/RubyObjectDescriptor.html",
45
+ "doc/Caricature/TypeDescriptor.html",
46
+ "doc/Caricature/Verification.html",
47
+ "doc/Class.html",
48
+ "doc/Hash.html",
49
+ "doc/Module.html",
50
+ "doc/Object.html",
51
+ "doc/README_markdown.html",
52
+ "doc/String.html",
53
+ "doc/System.html",
54
+ "doc/System/String.html",
55
+ "doc/System/Type.html",
56
+ "doc/created.rid",
57
+ "doc/images/brick.png",
58
+ "doc/images/brick_link.png",
59
+ "doc/images/bug.png",
60
+ "doc/images/bullet_black.png",
61
+ "doc/images/bullet_toggle_minus.png",
62
+ "doc/images/bullet_toggle_plus.png",
63
+ "doc/images/date.png",
64
+ "doc/images/find.png",
65
+ "doc/images/loadingAnimation.gif",
66
+ "doc/images/macFFBgHack.png",
67
+ "doc/images/package.png",
68
+ "doc/images/page_green.png",
69
+ "doc/images/page_white_text.png",
70
+ "doc/images/page_white_width.png",
71
+ "doc/images/plugin.png",
72
+ "doc/images/ruby.png",
73
+ "doc/images/tag_green.png",
74
+ "doc/images/wrench.png",
75
+ "doc/images/wrench_orange.png",
76
+ "doc/images/zoom.png",
77
+ "doc/index.html",
78
+ "doc/js/darkfish.js",
79
+ "doc/js/jquery.js",
80
+ "doc/js/quicksearch.js",
81
+ "doc/js/thickbox-compressed.js",
82
+ "doc/lib/caricature/clr/descriptor_rb.html",
83
+ "doc/lib/caricature/clr/isolation_rb.html",
84
+ "doc/lib/caricature/clr/isolator_rb.html",
85
+ "doc/lib/caricature/clr/messenger_rb.html",
86
+ "doc/lib/caricature/clr_rb.html",
87
+ "doc/lib/caricature/descriptor_rb.html",
88
+ "doc/lib/caricature/expectation_rb.html",
89
+ "doc/lib/caricature/isolation_rb.html",
90
+ "doc/lib/caricature/isolator_rb.html",
91
+ "doc/lib/caricature/messaging_rb.html",
92
+ "doc/lib/caricature/method_call_recorder_rb.html",
93
+ "doc/lib/caricature/verification_rb.html",
94
+ "doc/lib/caricature_rb.html",
95
+ "doc/lib/core_ext/array_rb.html",
96
+ "doc/lib/core_ext/class_rb.html",
97
+ "doc/lib/core_ext/core_ext_rb.html",
98
+ "doc/lib/core_ext/hash_rb.html",
99
+ "doc/lib/core_ext/module_rb.html",
100
+ "doc/lib/core_ext/object_rb.html",
101
+ "doc/lib/core_ext/string_rb.html",
102
+ "doc/lib/core_ext/system/string_rb.html",
103
+ "doc/lib/core_ext/system/type_rb.html",
104
+ "doc/rdoc.css",
105
+ "irb_init.rb",
106
+ "lib/bin/Workarounds.dll",
107
+ "lib/bin/Workarounds.pdb",
108
+ "lib/caricature.rb",
109
+ "lib/caricature/clr.rb",
110
+ "lib/caricature/clr/descriptor.rb",
111
+ "lib/caricature/clr/isolation.rb",
112
+ "lib/caricature/clr/isolator.rb",
113
+ "lib/caricature/clr/messenger.rb",
114
+ "lib/caricature/descriptor.rb",
115
+ "lib/caricature/expectation.rb",
116
+ "lib/caricature/isolation.rb",
117
+ "lib/caricature/isolator.rb",
118
+ "lib/caricature/messenger.rb",
119
+ "lib/caricature/method_call_recorder.rb",
120
+ "lib/caricature/verification.rb",
121
+ "lib/core_ext/array.rb",
122
+ "lib/core_ext/class.rb",
123
+ "lib/core_ext/core_ext.rb",
124
+ "lib/core_ext/hash.rb",
125
+ "lib/core_ext/module.rb",
126
+ "lib/core_ext/object.rb",
127
+ "lib/core_ext/string.rb",
128
+ "lib/core_ext/system/string.rb",
129
+ "lib/core_ext/system/type.rb",
130
+ "pkg/.gitignore",
131
+ "pkg/caricature-0.1.0.gem",
132
+ "spec/bacon_helper.rb",
133
+ "spec/bin/.gitignore",
134
+ "spec/core_ext_spec.rb",
135
+ "spec/descriptor_spec.rb",
136
+ "spec/expectation_spec.rb",
137
+ "spec/integration_spec.rb",
138
+ "spec/interop_spec.rb",
139
+ "spec/isolation_spec.rb",
140
+ "spec/isolator_spec.rb",
141
+ "spec/messaging_spec.rb",
142
+ "spec/method_call_spec.rb",
143
+ "spec/models/ClrModels.cs",
144
+ "spec/verification_spec.rb",
145
+ "workarounds/ReflectionHelper.cs"
146
+ ]
147
+ s.has_rdoc = true
148
+ s.homepage = %q{http://github.com/casualjim/caricature}
149
+ s.rdoc_options = ["--charset=UTF-8"]
150
+ s.require_paths = ["lib"]
151
+ s.rubyforge_project = %q{caricature}
152
+ s.rubygems_version = %q{1.3.2}
153
+ s.summary = %q{Caricature - Bringing simple mocking to the DLR}
154
+ s.test_files = [
155
+ "spec/bacon_helper.rb",
156
+ "spec/core_ext_spec.rb",
157
+ "spec/descriptor_spec.rb",
158
+ "spec/expectation_spec.rb",
159
+ "spec/integration_spec.rb",
160
+ "spec/interop_spec.rb",
161
+ "spec/isolation_spec.rb",
162
+ "spec/isolator_spec.rb",
163
+ "spec/messaging_spec.rb",
164
+ "spec/method_call_spec.rb",
165
+ "spec/verification_spec.rb"
166
+ ]
167
+
168
+ if s.respond_to? :specification_version then
169
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
170
+ s.specification_version = 3
171
+
172
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
173
+ else
174
+ end
175
+ else
176
+ end
177
+ end
data/doc/Array.html ADDED
@@ -0,0 +1,251 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+ <head>
6
+ <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
+
8
+ <title>Class: Array</title>
9
+
10
+ <link rel="stylesheet" href="./rdoc.css" type="text/css" media="screen" />
11
+
12
+ <script src="./js/jquery.js" type="text/javascript"
13
+ charset="utf-8"></script>
14
+ <script src="./js/thickbox-compressed.js" type="text/javascript"
15
+ charset="utf-8"></script>
16
+ <script src="./js/quicksearch.js" type="text/javascript"
17
+ charset="utf-8"></script>
18
+ <script src="./js/darkfish.js" type="text/javascript"
19
+ charset="utf-8"></script>
20
+
21
+ </head>
22
+ <body class="class">
23
+
24
+ <div id="metadata">
25
+ <div id="file-metadata">
26
+ <div id="file-list-section" class="section">
27
+ <h3 class="section-header">In Files</h3>
28
+ <div class="section-body">
29
+ <ul>
30
+
31
+ <li><a href="./lib/core_ext/array_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
+ class="thickbox" title="lib/core_ext/array.rb">lib/core_ext/array.rb</a></li>
33
+
34
+ </ul>
35
+ </div>
36
+ </div>
37
+
38
+
39
+ </div>
40
+
41
+ <div id="class-metadata">
42
+
43
+ <!-- Parent Class -->
44
+
45
+ <div id="parent-class-section" class="section">
46
+ <h3 class="section-header">Parent</h3>
47
+
48
+ <p class="link"><a href="Object.html">Object</a></p>
49
+
50
+ </div>
51
+
52
+
53
+ <!-- Namespace Contents -->
54
+
55
+
56
+ <!-- Method Quickref -->
57
+
58
+ <div id="method-list-section" class="section">
59
+ <h3 class="section-header">Methods</h3>
60
+ <ul class="link-list">
61
+
62
+ <li><a href="#M000079">#to_h</a></li>
63
+
64
+ </ul>
65
+ </div>
66
+
67
+
68
+ <!-- Included Modules -->
69
+
70
+ </div>
71
+
72
+ <div id="project-metadata">
73
+
74
+
75
+ <div id="fileindex-section" class="section project-section">
76
+ <h3 class="section-header">Files</h3>
77
+ <ul>
78
+
79
+ <li class="file"><a href="./README_markdown.html">README.markdown</a></li>
80
+
81
+ </ul>
82
+ </div>
83
+
84
+
85
+ <div id="classindex-section" class="section project-section">
86
+ <h3 class="section-header">Class Index
87
+ <span class="search-toggle"><img src="./images/find.png"
88
+ height="16" width="16" alt="[+]"
89
+ title="show/hide quicksearch" /></span></h3>
90
+ <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
91
+ <fieldset>
92
+ <legend>Quicksearch</legend>
93
+ <input type="text" name="quicksearch" value=""
94
+ class="quicksearch-field" />
95
+ </fieldset>
96
+ </form>
97
+
98
+ <ul class="link-list">
99
+
100
+ <li><a href="./Caricature.html">Caricature</a></li>
101
+
102
+ <li><a href="./Caricature/ArgumentRecording.html">Caricature::ArgumentRecording</a></li>
103
+
104
+ <li><a href="./Caricature/ClrClassDescriptor.html">Caricature::ClrClassDescriptor</a></li>
105
+
106
+ <li><a href="./Caricature/ClrClassMessenger.html">Caricature::ClrClassMessenger</a></li>
107
+
108
+ <li><a href="./Caricature/ClrInterfaceDescriptor.html">Caricature::ClrInterfaceDescriptor</a></li>
109
+
110
+ <li><a href="./Caricature/ClrInterfaceIsolator.html">Caricature::ClrInterfaceIsolator</a></li>
111
+
112
+ <li><a href="./Caricature/ClrInterfaceMessenger.html">Caricature::ClrInterfaceMessenger</a></li>
113
+
114
+ <li><a href="./Caricature/ClrIsolator.html">Caricature::ClrIsolator</a></li>
115
+
116
+ <li><a href="./Caricature/Expectation.html">Caricature::Expectation</a></li>
117
+
118
+ <li><a href="./Caricature/ExpectationBuilder.html">Caricature::ExpectationBuilder</a></li>
119
+
120
+ <li><a href="./Caricature/ExpectationSyntax.html">Caricature::ExpectationSyntax</a></li>
121
+
122
+ <li><a href="./Caricature/Expectations.html">Caricature::Expectations</a></li>
123
+
124
+ <li><a href="./Caricature/Interception.html">Caricature::Interception</a></li>
125
+
126
+ <li><a href="./Caricature/Interception/ClassMethods.html">Caricature::Interception::ClassMethods</a></li>
127
+
128
+ <li><a href="./Caricature/Isolation.html">Caricature::Isolation</a></li>
129
+
130
+ <li><a href="./Caricature/Isolator.html">Caricature::Isolator</a></li>
131
+
132
+ <li><a href="./Caricature/MemberDescriptor.html">Caricature::MemberDescriptor</a></li>
133
+
134
+ <li><a href="./Caricature/Messenger.html">Caricature::Messenger</a></li>
135
+
136
+ <li><a href="./Caricature/MethodCallRecorder.html">Caricature::MethodCallRecorder</a></li>
137
+
138
+ <li><a href="./Caricature/MethodCallRecording.html">Caricature::MethodCallRecording</a></li>
139
+
140
+ <li><a href="./Caricature/RubyIsolator.html">Caricature::RubyIsolator</a></li>
141
+
142
+ <li><a href="./Caricature/RubyMessenger.html">Caricature::RubyMessenger</a></li>
143
+
144
+ <li><a href="./Caricature/RubyObjectDescriptor.html">Caricature::RubyObjectDescriptor</a></li>
145
+
146
+ <li><a href="./Caricature/TypeDescriptor.html">Caricature::TypeDescriptor</a></li>
147
+
148
+ <li><a href="./Caricature/Verification.html">Caricature::Verification</a></li>
149
+
150
+ <li><a href="./System.html">System</a></li>
151
+
152
+ <li><a href="./System/String.html">System::String</a></li>
153
+
154
+ <li><a href="./System/Type.html">System::Type</a></li>
155
+
156
+ <li><a href="./Array.html">Array</a></li>
157
+
158
+ <li><a href="./Class.html">Class</a></li>
159
+
160
+ <li><a href="./Hash.html">Hash</a></li>
161
+
162
+ <li><a href="./Module.html">Module</a></li>
163
+
164
+ <li><a href="./Object.html">Object</a></li>
165
+
166
+ <li><a href="./String.html">String</a></li>
167
+
168
+ </ul>
169
+ <div id="no-class-search-results" style="display: none;">No matching classes.</div>
170
+ </div>
171
+
172
+
173
+ </div>
174
+ </div>
175
+
176
+ <div id="documentation">
177
+ <h1 class="class">Array</h1>
178
+
179
+ <div id="description">
180
+
181
+ </div>
182
+
183
+ <!-- Constants -->
184
+
185
+
186
+ <!-- Attributes -->
187
+
188
+
189
+ <!-- Methods -->
190
+
191
+ <div id="public-instance-method-details" class="method-section section">
192
+ <h3 class="section-header">Public Instance Methods</h3>
193
+
194
+
195
+ <div id="to-h-method" class="method-detail ">
196
+ <a name="M000079"></a>
197
+
198
+ <div class="method-heading">
199
+
200
+ <span class="method-name">to_h</span><span
201
+ class="method-args">()</span>
202
+ <span class="method-click-advice">click to toggle source</span>
203
+
204
+ </div>
205
+
206
+ <div class="method-description">
207
+
208
+ <p>
209
+ Converts an array of values to a hash. the even indexes are the hash keys
210
+ the odd indexes are the hash values
211
+ </p>
212
+
213
+
214
+
215
+ <div class="method-source-code"
216
+ id="to-h-source">
217
+ <pre>
218
+ <span class="ruby-comment cmt"># File lib/core_ext/array.rb, line 6</span>
219
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_h</span>
220
+ <span class="ruby-identifier">h</span> = <span class="ruby-constant">Hash</span>[<span class="ruby-operator">*</span><span class="ruby-keyword kw">self</span>]
221
+ <span class="ruby-identifier">h</span>.<span class="ruby-identifier">symbolize_keys!</span>
222
+ <span class="ruby-keyword kw">end</span></pre>
223
+ </div>
224
+
225
+ </div>
226
+
227
+
228
+ </div>
229
+
230
+
231
+ </div>
232
+
233
+
234
+ </div>
235
+
236
+
237
+ <div id="rdoc-debugging-section-dump" class="debugging-section">
238
+
239
+ <p>Disabled; run with --debug to generate this.</p>
240
+
241
+ </div>
242
+
243
+ <div id="validator-badges">
244
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
245
+ <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
246
+ Rdoc Generator</a> 1.1.6</small>.</p>
247
+ </div>
248
+
249
+ </body>
250
+ </html>
251
+