inspector 0.3.0 → 1.0.1
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.
- data/.gitignore +2 -0
- data/{MIT-LICENSE → LICENSE} +0 -0
- data/README.md +3 -0
- data/Rakefile +48 -39
- data/VERSION +1 -0
- data/inspector.gemspec +56 -0
- data/lib/inspector.rb +5 -6
- data/spec/crazy_example_object.rb +11 -0
- data/spec/inspector_spec.rb +38 -0
- data/spec/spec.opts +3 -0
- data/spec/spec_helper.rb +10 -0
- metadata +33 -25
- data/CHANGELOG +0 -2
- data/README.textile +0 -5
- data/doc/jamis.rb +0 -590
- data/lib/version.rb +0 -5
data/.gitignore
ADDED
data/{MIT-LICENSE → LICENSE}
RENAMED
File without changes
|
data/README.md
ADDED
data/Rakefile
CHANGED
@@ -1,42 +1,51 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
# This file may be distributed under an MIT style license.
|
5
|
-
# See MIT-LICENSE for details.
|
6
|
-
|
1
|
+
require 'rubygems'
|
2
|
+
require 'rake'
|
3
|
+
|
7
4
|
begin
|
8
|
-
require '
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
$package_version = CURRENT_VERSION
|
18
|
-
|
19
|
-
PKG_FILES = FileList['[A-Z]*',
|
20
|
-
'lib/**/*.rb',
|
21
|
-
'doc/**/*'
|
22
|
-
]
|
23
|
-
|
24
|
-
if !defined?(Spec)
|
25
|
-
puts "spec and cruise targets require RSpec"
|
26
|
-
else
|
27
|
-
desc "Run all examples with RCov"
|
28
|
-
Spec::Rake::SpecTask.new('cruise') do |t|
|
29
|
-
t.spec_files = FileList['spec/**/*.rb']
|
30
|
-
t.rcov = true
|
31
|
-
t.rcov_opts = ['--exclude', 'spec', '--exclude', 'Library']
|
32
|
-
end
|
33
|
-
|
34
|
-
desc "Run all examples"
|
35
|
-
Spec::Rake::SpecTask.new('spec') do |t|
|
36
|
-
t.spec_files = FileList['spec/**/*.rb']
|
37
|
-
t.rcov = false
|
38
|
-
t.spec_opts = ['-cfs']
|
5
|
+
require 'jeweler'
|
6
|
+
Jeweler::Tasks.new do |gem|
|
7
|
+
gem.name = "inspector"
|
8
|
+
gem.summary = %Q{Where is what defined now?}
|
9
|
+
gem.description = %Q{If you have method, yo I'll find it.}
|
10
|
+
gem.email = "chad.humphries@gmail.com"
|
11
|
+
gem.homepage = "http://github.com/spicycode/inspector"
|
12
|
+
gem.authors = ["Chad Humphries"]
|
13
|
+
gem.add_development_dependency "rspec", ">= 1.2.9"
|
39
14
|
end
|
15
|
+
Jeweler::GemcutterTasks.new
|
16
|
+
rescue LoadError
|
17
|
+
puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
|
18
|
+
end
|
19
|
+
|
20
|
+
require 'spec/rake/spectask'
|
21
|
+
Spec::Rake::SpecTask.new(:spec) do |spec|
|
22
|
+
spec.libs << 'lib' << 'spec'
|
23
|
+
spec.spec_files = FileList['spec/**/*_spec.rb']
|
24
|
+
end
|
25
|
+
|
26
|
+
Spec::Rake::SpecTask.new(:rcov) do |spec|
|
27
|
+
spec.libs << 'lib' << 'spec'
|
28
|
+
spec.pattern = 'spec/**/*_spec.rb'
|
29
|
+
spec.rcov = true
|
30
|
+
end
|
31
|
+
|
32
|
+
task :spec => :check_dependencies
|
33
|
+
|
34
|
+
task :default => :spec
|
35
|
+
|
36
|
+
begin
|
37
|
+
%w{sdoc sdoc-helpers rdiscount}.each { |name| gem name }
|
38
|
+
require 'sdoc_helpers'
|
39
|
+
rescue LoadError => ex
|
40
|
+
puts "sdoc support not enabled:"
|
41
|
+
puts ex.inspect
|
42
|
+
end
|
43
|
+
|
44
|
+
require 'rake/rdoctask'
|
45
|
+
Rake::RDocTask.new do |rdoc|
|
46
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ''
|
47
|
+
rdoc.rdoc_dir = 'rdoc'
|
48
|
+
rdoc.title = "inspector #{version}"
|
49
|
+
rdoc.rdoc_files.include('README*')
|
50
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
40
51
|
end
|
41
|
-
|
42
|
-
task :default => [:spec]
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
1.0.1
|
data/inspector.gemspec
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{inspector}
|
8
|
+
s.version = "1.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Chad Humphries"]
|
12
|
+
s.date = %q{2009-10-09}
|
13
|
+
s.description = %q{If you have method, yo I'll find it.}
|
14
|
+
s.email = %q{chad.humphries@gmail.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".gitignore",
|
21
|
+
"LICENSE",
|
22
|
+
"README.md",
|
23
|
+
"Rakefile",
|
24
|
+
"TODO",
|
25
|
+
"VERSION",
|
26
|
+
"inspector.gemspec",
|
27
|
+
"lib/inspector.rb",
|
28
|
+
"spec/crazy_example_object.rb",
|
29
|
+
"spec/inspector_spec.rb",
|
30
|
+
"spec/spec.opts",
|
31
|
+
"spec/spec_helper.rb"
|
32
|
+
]
|
33
|
+
s.homepage = %q{http://github.com/spicycode/inspector}
|
34
|
+
s.rdoc_options = ["--charset=UTF-8"]
|
35
|
+
s.require_paths = ["lib"]
|
36
|
+
s.rubygems_version = %q{1.3.5}
|
37
|
+
s.summary = %q{Where is what defined now?}
|
38
|
+
s.test_files = [
|
39
|
+
"spec/crazy_example_object.rb",
|
40
|
+
"spec/inspector_spec.rb",
|
41
|
+
"spec/spec_helper.rb"
|
42
|
+
]
|
43
|
+
|
44
|
+
if s.respond_to? :specification_version then
|
45
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
46
|
+
s.specification_version = 3
|
47
|
+
|
48
|
+
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
49
|
+
s.add_development_dependency(%q<rspec>, [">= 1.2.9"])
|
50
|
+
else
|
51
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
52
|
+
end
|
53
|
+
else
|
54
|
+
s.add_dependency(%q<rspec>, [">= 1.2.9"])
|
55
|
+
end
|
56
|
+
end
|
data/lib/inspector.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
class Inspector
|
2
|
-
|
2
|
+
|
3
|
+
# :nodoc:
|
3
4
|
def self._collect_events_for_method_call(&block)
|
4
5
|
events = []
|
5
6
|
|
@@ -16,10 +17,10 @@ class Inspector
|
|
16
17
|
events
|
17
18
|
end
|
18
19
|
|
20
|
+
# :nodoc:
|
19
21
|
def self._trace_the_method_call(&block)
|
20
|
-
events = _collect_events_for_method_call
|
22
|
+
events = _collect_events_for_method_call(&block)
|
21
23
|
|
22
|
-
# events.reject! { |event| !%w{call c-call return}.include?(event[:event]) }
|
23
24
|
valid_event_types = ['call', 'c-call', 'return']
|
24
25
|
|
25
26
|
events.each do |event|
|
@@ -35,8 +36,6 @@ class Inspector
|
|
35
36
|
|
36
37
|
end
|
37
38
|
|
38
|
-
# Original version from http://holgerkohnen.blogspot.com/
|
39
|
-
# which { some_object.some_method() } => <file>:<line>:
|
40
39
|
def self.where_is_this_defined(&block)
|
41
40
|
trace = _trace_the_method_call(&block)
|
42
41
|
return "Unable to determine where the method was defined" unless trace
|
@@ -48,4 +47,4 @@ class Inspector
|
|
48
47
|
end
|
49
48
|
end
|
50
49
|
|
51
|
-
end
|
50
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'crazy_example_object'
|
3
|
+
|
4
|
+
describe Inspector do
|
5
|
+
|
6
|
+
describe "where is this defined?" do
|
7
|
+
|
8
|
+
it "adds the 'where_is_this_defined' method to Kernel" do
|
9
|
+
Inspector.respond_to?(:where_is_this_defined).should == true
|
10
|
+
end
|
11
|
+
|
12
|
+
it "calls trace method call to do the heavy lifting" do
|
13
|
+
Inspector.should_receive(:_trace_the_method_call).and_return(nil)
|
14
|
+
|
15
|
+
Inspector.where_is_this_defined { "asdf".nil? }
|
16
|
+
end
|
17
|
+
|
18
|
+
it "returns a message indicating what file received the message on what line when it finds the call as a :call" do
|
19
|
+
Inspector.where_is_this_defined {
|
20
|
+
CrazyExampleObject.class_method_foo
|
21
|
+
}.should =~ /CrazyExampleObject method :class_method_foo defined in .*:\d+/
|
22
|
+
end
|
23
|
+
|
24
|
+
it "raises a no method error when it can't find the call" do
|
25
|
+
lambda {Inspector.where_is_this_defined { "asdf".french_fry? }}.should raise_error(NoMethodError)
|
26
|
+
end
|
27
|
+
|
28
|
+
describe "when asking about a standard library method" do
|
29
|
+
|
30
|
+
it "returns a friendly sorry, but we can't help you message" do
|
31
|
+
Inspector.where_is_this_defined { 'asdf'.reverse }.should == 'String method :reverse defined in STDLIB'
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
data/spec/spec.opts
ADDED
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inspector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chad Humphries
|
@@ -11,40 +11,46 @@ cert_chain: []
|
|
11
11
|
|
12
12
|
date: 2009-10-09 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: rspec
|
17
|
+
type: :development
|
18
|
+
version_requirement:
|
19
|
+
version_requirements: !ruby/object:Gem::Requirement
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 1.2.9
|
24
|
+
version:
|
25
|
+
description: If you have method, yo I'll find it.
|
26
|
+
email: chad.humphries@gmail.com
|
18
27
|
executables: []
|
19
28
|
|
20
29
|
extensions: []
|
21
30
|
|
22
31
|
extra_rdoc_files:
|
23
|
-
-
|
24
|
-
-
|
25
|
-
- TODO
|
26
|
-
- CHANGELOG
|
32
|
+
- LICENSE
|
33
|
+
- README.md
|
27
34
|
files:
|
28
|
-
-
|
35
|
+
- .gitignore
|
36
|
+
- LICENSE
|
37
|
+
- README.md
|
29
38
|
- Rakefile
|
30
|
-
- README.textile
|
31
|
-
- lib/inspector.rb
|
32
|
-
- lib/version.rb
|
33
|
-
- doc/jamis.rb
|
34
39
|
- TODO
|
35
|
-
-
|
40
|
+
- VERSION
|
41
|
+
- inspector.gemspec
|
42
|
+
- lib/inspector.rb
|
43
|
+
- spec/crazy_example_object.rb
|
44
|
+
- spec/inspector_spec.rb
|
45
|
+
- spec/spec.opts
|
46
|
+
- spec/spec_helper.rb
|
36
47
|
has_rdoc: true
|
37
|
-
homepage: http://github.com/spicycode/
|
48
|
+
homepage: http://github.com/spicycode/inspector
|
38
49
|
licenses: []
|
39
50
|
|
40
51
|
post_install_message:
|
41
52
|
rdoc_options:
|
42
|
-
- --
|
43
|
-
- --inline-source
|
44
|
-
- --main
|
45
|
-
- README.textile
|
46
|
-
- --title
|
47
|
-
- The Inspector
|
53
|
+
- --charset=UTF-8
|
48
54
|
require_paths:
|
49
55
|
- lib
|
50
56
|
required_ruby_version: !ruby/object:Gem::Requirement
|
@@ -65,6 +71,8 @@ rubyforge_project:
|
|
65
71
|
rubygems_version: 1.3.5
|
66
72
|
signing_key:
|
67
73
|
specification_version: 3
|
68
|
-
summary:
|
69
|
-
test_files:
|
70
|
-
|
74
|
+
summary: Where is what defined now?
|
75
|
+
test_files:
|
76
|
+
- spec/crazy_example_object.rb
|
77
|
+
- spec/inspector_spec.rb
|
78
|
+
- spec/spec_helper.rb
|
data/CHANGELOG
DELETED
data/README.textile
DELETED
data/doc/jamis.rb
DELETED
@@ -1,590 +0,0 @@
|
|
1
|
-
module RDoc
|
2
|
-
module Page
|
3
|
-
|
4
|
-
FONTS = "\"Bitstream Vera Sans\", Verdana, Arial, Helvetica, sans-serif"
|
5
|
-
|
6
|
-
STYLE = <<CSS
|
7
|
-
a {
|
8
|
-
color: #00F;
|
9
|
-
text-decoration: none;
|
10
|
-
}
|
11
|
-
|
12
|
-
a:hover {
|
13
|
-
color: #77F;
|
14
|
-
text-decoration: underline;
|
15
|
-
}
|
16
|
-
|
17
|
-
body, td, p {
|
18
|
-
font-family: %fonts%;
|
19
|
-
background: #FFF;
|
20
|
-
color: #000;
|
21
|
-
margin: 0px;
|
22
|
-
font-size: small;
|
23
|
-
}
|
24
|
-
|
25
|
-
#content {
|
26
|
-
margin: 2em;
|
27
|
-
}
|
28
|
-
|
29
|
-
#description p {
|
30
|
-
margin-bottom: 0.5em;
|
31
|
-
}
|
32
|
-
|
33
|
-
.sectiontitle {
|
34
|
-
margin-top: 1em;
|
35
|
-
margin-bottom: 1em;
|
36
|
-
padding: 0.5em;
|
37
|
-
padding-left: 2em;
|
38
|
-
background: #005;
|
39
|
-
color: #FFF;
|
40
|
-
font-weight: bold;
|
41
|
-
border: 1px dotted black;
|
42
|
-
}
|
43
|
-
|
44
|
-
.attr-rw {
|
45
|
-
padding-left: 1em;
|
46
|
-
padding-right: 1em;
|
47
|
-
text-align: center;
|
48
|
-
color: #055;
|
49
|
-
}
|
50
|
-
|
51
|
-
.attr-name {
|
52
|
-
font-weight: bold;
|
53
|
-
}
|
54
|
-
|
55
|
-
.attr-desc {
|
56
|
-
}
|
57
|
-
|
58
|
-
.attr-value {
|
59
|
-
font-family: monospace;
|
60
|
-
}
|
61
|
-
|
62
|
-
.file-title-prefix {
|
63
|
-
font-size: large;
|
64
|
-
}
|
65
|
-
|
66
|
-
.file-title {
|
67
|
-
font-size: large;
|
68
|
-
font-weight: bold;
|
69
|
-
background: #005;
|
70
|
-
color: #FFF;
|
71
|
-
}
|
72
|
-
|
73
|
-
.banner {
|
74
|
-
background: #005;
|
75
|
-
color: #FFF;
|
76
|
-
border: 1px solid black;
|
77
|
-
padding: 1em;
|
78
|
-
}
|
79
|
-
|
80
|
-
.banner td {
|
81
|
-
background: transparent;
|
82
|
-
color: #FFF;
|
83
|
-
}
|
84
|
-
|
85
|
-
h1 a, h2 a, .sectiontitle a, .banner a {
|
86
|
-
color: #FF0;
|
87
|
-
}
|
88
|
-
|
89
|
-
h1 a:hover, h2 a:hover, .sectiontitle a:hover, .banner a:hover {
|
90
|
-
color: #FF7;
|
91
|
-
}
|
92
|
-
|
93
|
-
.dyn-source {
|
94
|
-
display: none;
|
95
|
-
background: #FFE;
|
96
|
-
color: #000;
|
97
|
-
border: 1px dotted black;
|
98
|
-
margin: 0.5em 2em 0.5em 2em;
|
99
|
-
padding: 0.5em;
|
100
|
-
}
|
101
|
-
|
102
|
-
.dyn-source .cmt {
|
103
|
-
color: #00F;
|
104
|
-
font-style: italic;
|
105
|
-
}
|
106
|
-
|
107
|
-
.dyn-source .kw {
|
108
|
-
color: #070;
|
109
|
-
font-weight: bold;
|
110
|
-
}
|
111
|
-
|
112
|
-
.method {
|
113
|
-
margin-left: 1em;
|
114
|
-
margin-right: 1em;
|
115
|
-
margin-bottom: 1em;
|
116
|
-
}
|
117
|
-
|
118
|
-
.description pre {
|
119
|
-
padding: 0.5em;
|
120
|
-
border: 1px dotted black;
|
121
|
-
background: #FFE;
|
122
|
-
}
|
123
|
-
|
124
|
-
.method .title {
|
125
|
-
font-family: monospace;
|
126
|
-
font-size: large;
|
127
|
-
border-bottom: 1px dashed black;
|
128
|
-
margin-bottom: 0.3em;
|
129
|
-
padding-bottom: 0.1em;
|
130
|
-
}
|
131
|
-
|
132
|
-
.method .description, .method .sourcecode {
|
133
|
-
margin-left: 1em;
|
134
|
-
}
|
135
|
-
|
136
|
-
.description p, .sourcecode p {
|
137
|
-
margin-bottom: 0.5em;
|
138
|
-
}
|
139
|
-
|
140
|
-
.method .sourcecode p.source-link {
|
141
|
-
text-indent: 0em;
|
142
|
-
margin-top: 0.5em;
|
143
|
-
}
|
144
|
-
|
145
|
-
.method .aka {
|
146
|
-
margin-top: 0.3em;
|
147
|
-
margin-left: 1em;
|
148
|
-
font-style: italic;
|
149
|
-
text-indent: 2em;
|
150
|
-
}
|
151
|
-
|
152
|
-
h1 {
|
153
|
-
padding: 1em;
|
154
|
-
border: 1px solid black;
|
155
|
-
font-size: x-large;
|
156
|
-
font-weight: bold;
|
157
|
-
color: #FFF;
|
158
|
-
background: #007;
|
159
|
-
}
|
160
|
-
|
161
|
-
h2 {
|
162
|
-
padding: 0.5em 1em 0.5em 1em;
|
163
|
-
border: 1px solid black;
|
164
|
-
font-size: large;
|
165
|
-
font-weight: bold;
|
166
|
-
color: #FFF;
|
167
|
-
background: #009;
|
168
|
-
}
|
169
|
-
|
170
|
-
h3, h4, h5, h6 {
|
171
|
-
padding: 0.2em 1em 0.2em 1em;
|
172
|
-
border: 1px dashed black;
|
173
|
-
color: #000;
|
174
|
-
background: #AAF;
|
175
|
-
}
|
176
|
-
|
177
|
-
.sourcecode > pre {
|
178
|
-
padding: 0.5em;
|
179
|
-
border: 1px dotted black;
|
180
|
-
background: #FFE;
|
181
|
-
}
|
182
|
-
|
183
|
-
CSS
|
184
|
-
|
185
|
-
XHTML_PREAMBLE = %{<?xml version="1.0" encoding="%charset%"?>
|
186
|
-
<!DOCTYPE html
|
187
|
-
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
188
|
-
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
189
|
-
}
|
190
|
-
|
191
|
-
HEADER = XHTML_PREAMBLE + <<ENDHEADER
|
192
|
-
<html>
|
193
|
-
<head>
|
194
|
-
<title>%title%</title>
|
195
|
-
<meta http-equiv="Content-Type" content="text/html; charset=%charset%" />
|
196
|
-
<link rel="stylesheet" href="%style_url%" type="text/css" media="screen" />
|
197
|
-
|
198
|
-
<script language="JavaScript" type="text/javascript">
|
199
|
-
// <![CDATA[
|
200
|
-
|
201
|
-
function toggleSource( id )
|
202
|
-
{
|
203
|
-
var elem
|
204
|
-
var link
|
205
|
-
|
206
|
-
if( document.getElementById )
|
207
|
-
{
|
208
|
-
elem = document.getElementById( id )
|
209
|
-
link = document.getElementById( "l_" + id )
|
210
|
-
}
|
211
|
-
else if ( document.all )
|
212
|
-
{
|
213
|
-
elem = eval( "document.all." + id )
|
214
|
-
link = eval( "document.all.l_" + id )
|
215
|
-
}
|
216
|
-
else
|
217
|
-
return false;
|
218
|
-
|
219
|
-
if( elem.style.display == "block" )
|
220
|
-
{
|
221
|
-
elem.style.display = "none"
|
222
|
-
link.innerHTML = "show source"
|
223
|
-
}
|
224
|
-
else
|
225
|
-
{
|
226
|
-
elem.style.display = "block"
|
227
|
-
link.innerHTML = "hide source"
|
228
|
-
}
|
229
|
-
}
|
230
|
-
|
231
|
-
function openCode( url )
|
232
|
-
{
|
233
|
-
window.open( url, "SOURCE_CODE", "width=400,height=400,scrollbars=yes" )
|
234
|
-
}
|
235
|
-
// ]]>
|
236
|
-
</script>
|
237
|
-
</head>
|
238
|
-
|
239
|
-
<body>
|
240
|
-
ENDHEADER
|
241
|
-
|
242
|
-
FILE_PAGE = <<HTML
|
243
|
-
<table border='0' cellpadding='0' cellspacing='0' width="100%" class='banner'>
|
244
|
-
<tr><td>
|
245
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0'><tr>
|
246
|
-
<td class="file-title" colspan="2"><span class="file-title-prefix">File</span><br />%short_name%</td>
|
247
|
-
<td align="right">
|
248
|
-
<table border='0' cellspacing="0" cellpadding="2">
|
249
|
-
<tr>
|
250
|
-
<td>Path:</td>
|
251
|
-
<td>%full_path%
|
252
|
-
IF:cvsurl
|
253
|
-
(<a href="%cvsurl%">CVS</a>)
|
254
|
-
ENDIF:cvsurl
|
255
|
-
</td>
|
256
|
-
</tr>
|
257
|
-
<tr>
|
258
|
-
<td>Modified:</td>
|
259
|
-
<td>%dtm_modified%</td>
|
260
|
-
</tr>
|
261
|
-
</table>
|
262
|
-
</td></tr>
|
263
|
-
</table>
|
264
|
-
</td></tr>
|
265
|
-
</table><br>
|
266
|
-
HTML
|
267
|
-
|
268
|
-
###################################################################
|
269
|
-
|
270
|
-
CLASS_PAGE = <<HTML
|
271
|
-
<table width="100%" border='0' cellpadding='0' cellspacing='0' class='banner'><tr>
|
272
|
-
<td class="file-title"><span class="file-title-prefix">%classmod%</span><br />%full_name%</td>
|
273
|
-
<td align="right">
|
274
|
-
<table cellspacing=0 cellpadding=2>
|
275
|
-
<tr valign="top">
|
276
|
-
<td>In:</td>
|
277
|
-
<td>
|
278
|
-
START:infiles
|
279
|
-
HREF:full_path_url:full_path:
|
280
|
-
IF:cvsurl
|
281
|
-
(<a href="%cvsurl%">CVS</a>)
|
282
|
-
ENDIF:cvsurl
|
283
|
-
END:infiles
|
284
|
-
</td>
|
285
|
-
</tr>
|
286
|
-
IF:parent
|
287
|
-
<tr>
|
288
|
-
<td>Parent:</td>
|
289
|
-
<td>
|
290
|
-
IF:par_url
|
291
|
-
<a href="%par_url%">
|
292
|
-
ENDIF:par_url
|
293
|
-
%parent%
|
294
|
-
IF:par_url
|
295
|
-
</a>
|
296
|
-
ENDIF:par_url
|
297
|
-
</td>
|
298
|
-
</tr>
|
299
|
-
ENDIF:parent
|
300
|
-
</table>
|
301
|
-
</td>
|
302
|
-
</tr>
|
303
|
-
</table>
|
304
|
-
HTML
|
305
|
-
|
306
|
-
###################################################################
|
307
|
-
|
308
|
-
METHOD_LIST = <<HTML
|
309
|
-
<div id="content">
|
310
|
-
IF:diagram
|
311
|
-
<table cellpadding='0' cellspacing='0' border='0' width="100%"><tr><td align="center">
|
312
|
-
%diagram%
|
313
|
-
</td></tr></table>
|
314
|
-
ENDIF:diagram
|
315
|
-
|
316
|
-
IF:description
|
317
|
-
<div class="description">%description%</div>
|
318
|
-
ENDIF:description
|
319
|
-
|
320
|
-
IF:requires
|
321
|
-
<div class="sectiontitle">Required Files</div>
|
322
|
-
<ul>
|
323
|
-
START:requires
|
324
|
-
<li>HREF:aref:name:</li>
|
325
|
-
END:requires
|
326
|
-
</ul>
|
327
|
-
ENDIF:requires
|
328
|
-
|
329
|
-
IF:toc
|
330
|
-
<div class="sectiontitle">Contents</div>
|
331
|
-
<ul>
|
332
|
-
START:toc
|
333
|
-
<li><a href="#%href%">%secname%</a></li>
|
334
|
-
END:toc
|
335
|
-
</ul>
|
336
|
-
ENDIF:toc
|
337
|
-
|
338
|
-
IF:methods
|
339
|
-
<div class="sectiontitle">Methods</div>
|
340
|
-
<ul>
|
341
|
-
START:methods
|
342
|
-
<li>HREF:aref:name:</li>
|
343
|
-
END:methods
|
344
|
-
</ul>
|
345
|
-
ENDIF:methods
|
346
|
-
|
347
|
-
IF:includes
|
348
|
-
<div class="sectiontitle">Included Modules</div>
|
349
|
-
<ul>
|
350
|
-
START:includes
|
351
|
-
<li>HREF:aref:name:</li>
|
352
|
-
END:includes
|
353
|
-
</ul>
|
354
|
-
ENDIF:includes
|
355
|
-
|
356
|
-
START:sections
|
357
|
-
IF:sectitle
|
358
|
-
<div class="sectiontitle"><a nem="%secsequence%">%sectitle%</a></div>
|
359
|
-
IF:seccomment
|
360
|
-
<div class="description">
|
361
|
-
%seccomment%
|
362
|
-
</div>
|
363
|
-
ENDIF:seccomment
|
364
|
-
ENDIF:sectitle
|
365
|
-
|
366
|
-
IF:classlist
|
367
|
-
<div class="sectiontitle">Classes and Modules</div>
|
368
|
-
%classlist%
|
369
|
-
ENDIF:classlist
|
370
|
-
|
371
|
-
IF:constants
|
372
|
-
<div class="sectiontitle">Constants</div>
|
373
|
-
<table border='0' cellpadding='5'>
|
374
|
-
START:constants
|
375
|
-
<tr valign='top'>
|
376
|
-
<td class="attr-name">%name%</td>
|
377
|
-
<td>=</td>
|
378
|
-
<td class="attr-value">%value%</td>
|
379
|
-
</tr>
|
380
|
-
IF:desc
|
381
|
-
<tr valign='top'>
|
382
|
-
<td> </td>
|
383
|
-
<td colspan="2" class="attr-desc">%desc%</td>
|
384
|
-
</tr>
|
385
|
-
ENDIF:desc
|
386
|
-
END:constants
|
387
|
-
</table>
|
388
|
-
ENDIF:constants
|
389
|
-
|
390
|
-
IF:attributes
|
391
|
-
<div class="sectiontitle">Attributes</div>
|
392
|
-
<table border='0' cellpadding='5'>
|
393
|
-
START:attributes
|
394
|
-
<tr valign='top'>
|
395
|
-
<td class='attr-rw'>
|
396
|
-
IF:rw
|
397
|
-
[%rw%]
|
398
|
-
ENDIF:rw
|
399
|
-
</td>
|
400
|
-
<td class='attr-name'>%name%</td>
|
401
|
-
<td class='attr-desc'>%a_desc%</td>
|
402
|
-
</tr>
|
403
|
-
END:attributes
|
404
|
-
</table>
|
405
|
-
ENDIF:attributes
|
406
|
-
|
407
|
-
IF:method_list
|
408
|
-
START:method_list
|
409
|
-
IF:methods
|
410
|
-
<div class="sectiontitle">%type% %category% methods</div>
|
411
|
-
START:methods
|
412
|
-
<div class="method">
|
413
|
-
<div class="title">
|
414
|
-
IF:callseq
|
415
|
-
<a name="%aref%"></a><b>%callseq%</b>
|
416
|
-
ENDIF:callseq
|
417
|
-
IFNOT:callseq
|
418
|
-
<a name="%aref%"></a><b>%name%</b>%params%
|
419
|
-
ENDIF:callseq
|
420
|
-
IF:codeurl
|
421
|
-
[ <a href="javascript:openCode('%codeurl%')">source</a> ]
|
422
|
-
ENDIF:codeurl
|
423
|
-
</div>
|
424
|
-
IF:m_desc
|
425
|
-
<div class="description">
|
426
|
-
%m_desc%
|
427
|
-
</div>
|
428
|
-
ENDIF:m_desc
|
429
|
-
IF:aka
|
430
|
-
<div class="aka">
|
431
|
-
This method is also aliased as
|
432
|
-
START:aka
|
433
|
-
<a href="%aref%">%name%</a>
|
434
|
-
END:aka
|
435
|
-
</div>
|
436
|
-
ENDIF:aka
|
437
|
-
IF:sourcecode
|
438
|
-
<div class="sourcecode">
|
439
|
-
<p class="source-link">[ <a href="javascript:toggleSource('%aref%_source')" id="l_%aref%_source">show source</a> ]</p>
|
440
|
-
<div id="%aref%_source" class="dyn-source">
|
441
|
-
<pre>
|
442
|
-
%sourcecode%
|
443
|
-
</pre>
|
444
|
-
</div>
|
445
|
-
</div>
|
446
|
-
ENDIF:sourcecode
|
447
|
-
</div>
|
448
|
-
END:methods
|
449
|
-
ENDIF:methods
|
450
|
-
END:method_list
|
451
|
-
ENDIF:method_list
|
452
|
-
END:sections
|
453
|
-
</div>
|
454
|
-
HTML
|
455
|
-
|
456
|
-
FOOTER = <<ENDFOOTER
|
457
|
-
</body>
|
458
|
-
</html>
|
459
|
-
ENDFOOTER
|
460
|
-
|
461
|
-
BODY = HEADER + <<ENDBODY
|
462
|
-
!INCLUDE! <!-- banner header -->
|
463
|
-
|
464
|
-
<div id="bodyContent">
|
465
|
-
#{METHOD_LIST}
|
466
|
-
</div>
|
467
|
-
|
468
|
-
#{FOOTER}
|
469
|
-
ENDBODY
|
470
|
-
|
471
|
-
########################## Source code ##########################
|
472
|
-
|
473
|
-
SRC_PAGE = XHTML_PREAMBLE + <<HTML
|
474
|
-
<html>
|
475
|
-
<head><title>%title%</title>
|
476
|
-
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
477
|
-
<style>
|
478
|
-
.ruby-comment { color: green; font-style: italic }
|
479
|
-
.ruby-constant { color: #4433aa; font-weight: bold; }
|
480
|
-
.ruby-identifier { color: #222222; }
|
481
|
-
.ruby-ivar { color: #2233dd; }
|
482
|
-
.ruby-keyword { color: #3333FF; font-weight: bold }
|
483
|
-
.ruby-node { color: #777777; }
|
484
|
-
.ruby-operator { color: #111111; }
|
485
|
-
.ruby-regexp { color: #662222; }
|
486
|
-
.ruby-value { color: #662222; font-style: italic }
|
487
|
-
.kw { color: #3333FF; font-weight: bold }
|
488
|
-
.cmt { color: green; font-style: italic }
|
489
|
-
.str { color: #662222; font-style: italic }
|
490
|
-
.re { color: #662222; }
|
491
|
-
</style>
|
492
|
-
</head>
|
493
|
-
<body bgcolor="white">
|
494
|
-
<pre>%code%</pre>
|
495
|
-
</body>
|
496
|
-
</html>
|
497
|
-
HTML
|
498
|
-
|
499
|
-
########################## Index ################################
|
500
|
-
|
501
|
-
FR_INDEX_BODY = <<HTML
|
502
|
-
!INCLUDE!
|
503
|
-
HTML
|
504
|
-
|
505
|
-
FILE_INDEX = XHTML_PREAMBLE + <<HTML
|
506
|
-
<html>
|
507
|
-
<head>
|
508
|
-
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
509
|
-
<style>
|
510
|
-
<!--
|
511
|
-
body {
|
512
|
-
background-color: #EEE;
|
513
|
-
font-family: #{FONTS};
|
514
|
-
color: #000;
|
515
|
-
margin: 0px;
|
516
|
-
}
|
517
|
-
.banner {
|
518
|
-
background: #005;
|
519
|
-
color: #FFF;
|
520
|
-
padding: 0.2em;
|
521
|
-
font-size: small;
|
522
|
-
font-weight: bold;
|
523
|
-
text-align: center;
|
524
|
-
}
|
525
|
-
.entries {
|
526
|
-
margin: 0.25em 1em 0 1em;
|
527
|
-
font-size: x-small;
|
528
|
-
}
|
529
|
-
a {
|
530
|
-
color: #00F;
|
531
|
-
text-decoration: none;
|
532
|
-
white-space: nowrap;
|
533
|
-
}
|
534
|
-
a:hover {
|
535
|
-
color: #77F;
|
536
|
-
text-decoration: underline;
|
537
|
-
}
|
538
|
-
-->
|
539
|
-
</style>
|
540
|
-
<base target="docwin">
|
541
|
-
</head>
|
542
|
-
<body>
|
543
|
-
<div class="banner">%list_title%</div>
|
544
|
-
<div class="entries">
|
545
|
-
START:entries
|
546
|
-
<a href="%href%">%name%</a><br>
|
547
|
-
END:entries
|
548
|
-
</div>
|
549
|
-
</body></html>
|
550
|
-
HTML
|
551
|
-
|
552
|
-
CLASS_INDEX = FILE_INDEX
|
553
|
-
METHOD_INDEX = FILE_INDEX
|
554
|
-
|
555
|
-
INDEX = XHTML_PREAMBLE + <<HTML
|
556
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
557
|
-
<head>
|
558
|
-
<title>%title%</title>
|
559
|
-
<meta http-equiv="Content-Type" content="text/html; charset=%charset%">
|
560
|
-
</head>
|
561
|
-
|
562
|
-
<frameset cols="20%,*">
|
563
|
-
<frameset rows="15%,35%,50%">
|
564
|
-
<frame src="fr_file_index.html" title="Files" name="Files" />
|
565
|
-
<frame src="fr_class_index.html" name="Classes" />
|
566
|
-
<frame src="fr_method_index.html" name="Methods" />
|
567
|
-
</frameset>
|
568
|
-
IF:inline_source
|
569
|
-
<frame src="%initial_page%" name="docwin">
|
570
|
-
ENDIF:inline_source
|
571
|
-
IFNOT:inline_source
|
572
|
-
<frameset rows="80%,20%">
|
573
|
-
<frame src="%initial_page%" name="docwin">
|
574
|
-
<frame src="blank.html" name="source">
|
575
|
-
</frameset>
|
576
|
-
ENDIF:inline_source
|
577
|
-
<noframes>
|
578
|
-
<body bgcolor="white">
|
579
|
-
Click <a href="html/index.html">here</a> for a non-frames
|
580
|
-
version of this page.
|
581
|
-
</body>
|
582
|
-
</noframes>
|
583
|
-
</frameset>
|
584
|
-
|
585
|
-
</html>
|
586
|
-
HTML
|
587
|
-
|
588
|
-
end
|
589
|
-
end
|
590
|
-
|