wax 0.9.4 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,16 @@
1
+ class Address
2
+ attr_accessor :street, :city, :state, :zip
3
+
4
+ def initialize(street, city, state, zip)
5
+ @street, @city, @state, @zip = street, city, state, zip
6
+ end
7
+
8
+ def to_xml(wax)
9
+ wax.start('address').
10
+ child('street', @street).
11
+ child('city', @city).
12
+ child('state', @state).
13
+ child('zip', @zip).
14
+ end!
15
+ end
16
+ end
@@ -0,0 +1,22 @@
1
+ class Car
2
+ attr_accessor :make, :model, :year
3
+
4
+ def initialize(make, model, year)
5
+ @make, @model, @year = make, model, year
6
+ end
7
+
8
+ def to_xml(wax)
9
+ wax.start('car').attr('year', @year).
10
+ child('make', @make).
11
+ child('model', @model).
12
+ end!
13
+ end
14
+ end
15
+
16
+ if $PROGRAM_NAME == __FILE__ || $PROGRAM_NAME =~ /\/rake/
17
+ require 'wax'
18
+ car = Car.new 'Toyota', 'Prius', 2008
19
+ wax = WAX.new
20
+ car.to_xml(wax)
21
+ wax.close
22
+ end
@@ -1,6 +1,7 @@
1
+ # This implements the Object#instance_exec method
2
+ # for versions that don't have it (before 1.9).
1
3
  # This solution was found at
2
- # http://www.jroller.com/abstractScope/entry/
3
- # passing_parameters_to_an_instance
4
+ # http://www.jroller.com/abstractScope/entry/passing_parameters_to_an_instance.
4
5
 
5
6
  # Add a bind method to the Proc class.
6
7
  class Proc
@@ -0,0 +1,24 @@
1
+ class Person
2
+ attr_accessor :name, :birthdate, :address
3
+
4
+ def initialize(name, birthdate, address)
5
+ @name, @birthdate, @address = name, birthdate, address
6
+ end
7
+
8
+ def to_xml(wax)
9
+ wax.start('person').attr('birthdate', @birthdate).child('name', @name)
10
+ @address.to_xml(wax)
11
+ wax.end!
12
+ end
13
+ end
14
+
15
+ if $PROGRAM_NAME == __FILE__ || $PROGRAM_NAME =~ /\/rake/
16
+ require 'address'
17
+ require 'wax'
18
+
19
+ address = Address.new('123 Some Street', 'Some City', 'MO', 12345)
20
+ person = Person.new('R. Mark Volkmann', '4/16/1961', address)
21
+ wax = WAX.new
22
+ person.to_xml(wax)
23
+ wax.close
24
+ end
@@ -1,190 +1,214 @@
1
1
  require 'wax'
2
2
 
3
- # This serves as a tutorial for using WAX.
3
+ # This serves as a tutorial for using WAX for Ruby.
4
4
 
5
5
  def out(text)
6
6
  puts "\n\n#{text}\n"
7
7
  end
8
8
 
9
- # When the no-arg WAX constructor is used, XML is written to stdout.
10
- # There are also WAX constructors that take an IO object.
11
- wax = WAX.new
9
+ # When nothing is passed to the WAX.write method, XML is written to $stdout.
10
+ # There is also a WAX.write method that takes an IO object.
12
11
 
13
- out "Only a root element:"
14
- wax.start("car").close
12
+ out 'Only a root element:'
13
+ WAX.write { start 'car' }
15
14
  # <car/>
16
15
 
17
- # After a WAX object is closed,
18
- # a new one must be created to write more XML.
19
- wax = WAX.new
20
-
21
- out "A root element with some text inside:"
22
- wax.start("car").text("Prius").close
16
+ out 'A root element with some text inside:'
17
+ WAX.write do
18
+ start 'car'
19
+ text 'Prius'
20
+ end
23
21
  # <car>Prius</car>
24
22
 
25
- out "Text inside a child element:"
26
- wax = WAX.new
27
- wax.start("car").start("model").text("Prius").close
23
+ out 'Text inside a child element:'
24
+ WAX.write do
25
+ start 'car'
26
+ start 'model'
27
+ text 'Prius'
28
+ end
28
29
  # <car>
29
30
  # <model>Prius</model>
30
31
  # </car>
31
32
 
32
- out "The same with the \"child\" convenience method:"
33
- wax = WAX.new
34
- wax.start("car").child("model", "Prius").close
33
+ out 'The same with the \'child\' convenience method:'
34
+ WAX.write do
35
+ start 'car'
36
+ child 'model', 'Prius'
37
+ end
35
38
  # <car>
36
39
  # <model>Prius</model>
37
40
  # </car>
38
41
 
39
- out "Text in a CDATA section:"
40
- wax = WAX.new
41
- wax.start("car").start("model").cdata("1<2>3&4'5\"6").close
42
+ out 'Text in a CDATA section:'
43
+ WAX.write do
44
+ start 'car'
45
+ start 'model'
46
+ cdata "1<2>3&4'5\"6"
47
+ end
42
48
  # <car>
43
49
  # <model>
44
50
  # <![CDATA[1<2>3&4'5\"6]]>
45
51
  # </model>
46
52
  # </car>
47
53
 
48
- out "Without indentation, on a single line:"
49
- wax = WAX.new
50
- wax.set_indent(nil)
51
- wax.start("car").child("model", "Prius").close
54
+ out 'Without indentation, on a single line:'
55
+ WAX.write do
56
+ set_indent nil
57
+ start 'car'
58
+ child 'model', 'Prius'
59
+ end
52
60
  # <car><model>Prius</model></car>
53
61
 
54
- out "Indent with four spaces instead of the default of two:"
55
- wax = WAX.new
56
- wax.set_indent(" ")
57
- wax.start("car").child("model", "Prius").close
62
+ out 'Indent with four spaces instead of the default of two:'
63
+ WAX.write do
64
+ set_indent ' ' # could also pass 4
65
+ start 'car'
66
+ child 'model', 'Prius'
67
+ end
58
68
  # <car>
59
69
  # <model>Prius</model>
60
70
  # </car>
61
71
 
62
- out "Add an attribute:"
63
- wax = WAX.new
64
- wax.start("car").attr("year", 2008).child("model", "Prius").close
65
- # <car year="2008">
72
+ out 'Add an attribute:'
73
+ WAX.write do
74
+ start 'car'
75
+ attr 'year', 2008
76
+ child 'model', 'Prius'
77
+ end
78
+ # <car year='2008'>
66
79
  # <model>Prius</model>
67
80
  # </car>
68
81
 
69
- out "XML declaration:"
70
- wax = WAX.new($stdout, "1.0")
71
- wax.start("car").attr("year", 2008).child("model", "Prius").close
72
- # <?xml version="1.0" encoding="UTF-8"?>
73
- # <car year="2008">
82
+ out 'XML declaration:'
83
+ WAX.write($stdout, '1.0') do
84
+ start 'car'
85
+ attr 'year', 2008
86
+ child 'model', 'Prius'
87
+ end
88
+ # <?xml version='1.0' encoding='UTF-8'?>
89
+ # <car year='2008'>
74
90
  # <model>Prius</model>
75
91
  # </car>
76
92
 
77
- out "Comment:"
93
+ out 'Comment:'
78
94
  WAX.write do
79
- comment "This is a hybrid car."
80
- start "car"
81
- child "model", "Prius"
95
+ comment 'This is a hybrid car.'
96
+ start 'car'
97
+ child 'model', 'Prius'
82
98
  end
83
99
  # <!-- This is a hybrid car. -->
84
100
  # <car>
85
101
  # <model>Prius</model>
86
102
  # </car>
87
103
 
88
- out "Processing instruction:"
104
+ out 'Processing instruction:'
89
105
  WAX.write do
90
- processing_instruction "target", "data"
91
- start "car"
92
- attr "year", 2008
93
- child "model", "Prius"
106
+ processing_instruction 'target', 'data'
107
+ start 'car'
108
+ attr 'year', 2008
109
+ child 'model', 'Prius'
94
110
  end
95
111
  # <?target data?>
96
- # <car year="2008">
112
+ # <car year='2008'>
97
113
  # <model>Prius</model>
98
114
  # </car>
99
115
 
100
- out "Associate an XSLT stylesheet:"
116
+ out 'Associate an XSLT stylesheet:'
101
117
  WAX.write do
102
- xslt "car.xslt"
103
- start "car"
104
- attr "year", 2008
105
- child "model", "Prius"
118
+ xslt 'car.xslt'
119
+ start 'car'
120
+ attr 'year', 2008
121
+ child 'model', 'Prius'
106
122
  end
107
- # <?xml-stylesheet type="text/xsl" href="car.xslt"?>
108
- # <car year="2008">
123
+ # <?xml-stylesheet type='text/xsl' href='car.xslt'?>
124
+ # <car year='2008'>
109
125
  # <model>Prius</model>
110
126
  # </car>
111
127
 
112
- out "Associate a default namespace:"
128
+ out 'Associate a default namespace:'
113
129
  WAX.write do
114
- xslt "car.xslt"
115
- start "car"
116
- attr "year", 2008
117
- namespace "http://www.ociweb.com/cars"
118
- child "model", "Prius"
130
+ xslt 'car.xslt'
131
+ start 'car'
132
+ attr 'year', 2008
133
+ namespace 'http://www.ociweb.com/cars'
134
+ child 'model', 'Prius'
119
135
  end
120
- # <car year="2008"
121
- # xmlns="http://www.ociweb.com/cars">
136
+ # <car year='2008'
137
+ # xmlns='http://www.ociweb.com/cars'>
122
138
  # <model>Prius</model>
123
139
  # </car>
124
140
 
125
- out "Associate a non-default namespace with the XML:"
126
- prefix = "c"
141
+ out 'Associate a non-default namespace with the XML:'
142
+ prefix = 'c'
127
143
  WAX.write do
128
- start prefix, "car"
129
- attr "year", 2008
130
- namespace prefix, "http://www.ociweb.com/cars"
131
- child prefix, "model", "Prius"
144
+ start prefix, 'car'
145
+ attr 'year', 2008
146
+ namespace prefix, 'http://www.ociweb.com/cars'
147
+ child prefix, 'model', 'Prius'
132
148
  end
133
- # <c:car year="2008"
134
- # xmlns:c="http://www.ociweb.com/cars">
149
+ # <c:car year='2008'
150
+ # xmlns:c='http://www.ociweb.com/cars'>
135
151
  # <c:model>Prius</c:model>
136
152
  # </c:car>
137
153
 
138
- out "Associate an XML Schema:"
154
+ out 'Associate an XML Schema:'
139
155
  WAX.write do
140
- start "car"
141
- attr "year", 2008
142
- namespace nil, "http://www.ociweb.com/cars", "car.xsd"
143
- child "model", "Prius"
156
+ start 'car'
157
+ attr 'year', 2008
158
+ namespace nil, 'http://www.ociweb.com/cars', 'car.xsd'
159
+ child 'model', 'Prius'
144
160
  end
145
- # <car year="2008"
146
- # xmlns="http://www.ociweb.com/cars"
147
- # xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
148
- # xsi:schemaLocation="http://www.ociweb.com/cars car.xsd">
161
+ # <car year='2008'
162
+ # xmlns='http://www.ociweb.com/cars'
163
+ # xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
164
+ # xsi:schemaLocation='http://www.ociweb.com/cars car.xsd'>
149
165
  # <model>Prius</model>
150
166
  # </car>
151
167
 
152
- out "Associate multiple XML Schemas:"
168
+ out 'Associate multiple XML Schemas:'
153
169
  WAX.write do
154
- start "car"
155
- attr "year", 2008
156
- namespace nil, "http://www.ociweb.com/cars", "car.xsd"
157
- namespace "m", "http://www.ociweb.com/model", "model.xsd"
158
- child "m", "model", "Prius"
170
+ start 'car'
171
+ attr 'year', 2008
172
+ namespace nil, 'http://www.ociweb.com/cars', 'car.xsd'
173
+ namespace 'm', 'http://www.ociweb.com/model', 'model.xsd'
174
+ child 'm', 'model', 'Prius'
159
175
  end
160
- # <car year="2008"
161
- # xmlns="http://www.ociweb.com/cars"
162
- # xmlns:m="http://www.ociweb.com/model"
163
- # xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
164
- # xsi:schemaLocation="http://www.ociweb.com/cars car.xsd
165
- # http://www.ociweb.com/model model.xsd">
176
+ # <car year='2008'
177
+ # xmlns='http://www.ociweb.com/cars'
178
+ # xmlns:m='http://www.ociweb.com/model'
179
+ # xmlns:xsi='http://www.w3.org/1999/XMLSchema-instance'
180
+ # xsi:schemaLocation='http://www.ociweb.com/cars car.xsd
181
+ # http://www.ociweb.com/model model.xsd'>
166
182
  # <m:model>Prius</m:model>
167
183
  # </car>
168
184
 
169
- out "Associate a DTD:"
185
+ out 'Associate a DTD:'
170
186
  WAX.write do
171
- dtd "car.dtd"
172
- start "car"
173
- attr "year", 2008
174
- child "model", "Prius"
187
+ dtd 'car.dtd'
188
+ start 'car'
189
+ attr 'year', 2008
190
+ child 'model', 'Prius'
175
191
  end
176
- # <!DOCTYPE car SYSTEM "car.dtd">
177
- # <car year="2008">
192
+ # <!DOCTYPE car SYSTEM 'car.dtd'>
193
+ # <car year='2008'>
178
194
  # <model>Prius</model>
179
195
  # </car>
180
196
 
181
- out "Entity definitions in DOCTYPE:"
182
- String url = "http://www.ociweb.com/xml/";
197
+ out 'Entity definitions in DOCTYPE:'
198
+ String url = 'http://www.ociweb.com/xml/';
183
199
  WAX.write do
184
- entity_def "oci", "Object Computing, Inc."
185
- external_entity_def "moreData", url + "moreData.xml"
186
- start "root"
187
- text "The author works at &oci; in St. Louis, Missouri.",
200
+ entity_def 'oci', 'Object Computing, Inc.'
201
+ external_entity_def 'moreData', url + 'moreData.xml'
202
+ start 'root'
203
+ text 'The author works at &oci; in St. Louis, Missouri.',
188
204
  true, false # turning escaping off for entity reference
189
- text "&moreData;", true, false
190
- end
205
+ text '&moreData;', true, false
206
+ end
207
+ # <!DOCTYPE root [
208
+ # <!ENTITY oci "Object Computing, Inc.">
209
+ # <!ENTITY moreData SYSTEM "http://www.ociweb.com/xml/moreData.xml">
210
+ #>
211
+ #<root>
212
+ # The author works at &oci; in St. Louis, Missouri.
213
+ # &moreData;
214
+ # </root>
data/lib/wax.rb CHANGED
@@ -35,7 +35,7 @@ class WAX
35
35
  # Creates a WAX object, invokes the specified block on it
36
36
  # and calls close on the WAX object.
37
37
  # The writer can be a String file path, an IO object such as a File,
38
- # or unspecified to write $stdout.
38
+ # or unspecified to out $stdout.
39
39
  # If the version isn't specified then no XML declaration will be written.
40
40
  def self.write(writer=$stdout, version=nil, &proc)
41
41
  writer = File.new(writer, "w") if writer.kind_of?(String)
@@ -94,10 +94,10 @@ class WAX
94
94
  if new_line
95
95
  write_indent
96
96
  else
97
- write ' '
97
+ out ' '
98
98
  end
99
99
 
100
- write "#{qname}=\"#{value}\""
100
+ out "#{qname}=\"#{value}\""
101
101
 
102
102
  self
103
103
  end
@@ -123,7 +123,7 @@ class WAX
123
123
  end
124
124
 
125
125
  # A convenience method that is a shortcut for
126
- # start(prefix, name).text(text).end_element().
126
+ # start(prefix, name).text(text).end!().
127
127
  def child(p1, p2, p3=nil)
128
128
  if (p3 == nil)
129
129
  # only specified element name and text
@@ -134,7 +134,7 @@ class WAX
134
134
  end
135
135
 
136
136
  bad_state("child") if @check_me and @state == :after_root
137
- start(prefix, name).text(text).end_element
137
+ start(prefix, name).text(text).end!
138
138
  end
139
139
 
140
140
  # Terminates all unterminated elements,
@@ -145,7 +145,7 @@ class WAX
145
145
  bad_state("close") if @check_me and @state == :in_prolog
146
146
 
147
147
  # End all the unended elements.
148
- while @parent_stack.size > 0; end_element; end
148
+ while @parent_stack.size > 0; end!; end
149
149
 
150
150
  if @close_stream
151
151
  @writer.close
@@ -167,8 +167,8 @@ class WAX
167
167
  terminate_start
168
168
  write_indent if @parent_stack.size > 0
169
169
 
170
- write "<!-- #{text} -->"
171
- write "\n" if will_indent and @parent_stack.size == 0
170
+ out "<!-- #{text} -->"
171
+ out "\n" if will_indent and @parent_stack.size == 0
172
172
 
173
173
  self
174
174
  end
@@ -187,7 +187,8 @@ class WAX
187
187
  # Terminates the current element.
188
188
  # It does so in the shorthand way (/&gt;) if the element has no content,
189
189
  # and in the long way (&lt;/name&gt;) if it does.
190
- def end_element
190
+ # The name of this method ends in ! because end is a keyword in Ruby.
191
+ def end!
191
192
  if @check_me
192
193
  bad_state("end") if @state == :in_prolog or @state == :after_root
193
194
  verify_prefixes
@@ -203,9 +204,9 @@ class WAX
203
204
 
204
205
  if @has_content
205
206
  write_indent if @has_indented_content
206
- write "</#{name}>"
207
+ out "</#{name}>"
207
208
  else
208
- write "/>"
209
+ out "/>"
209
210
  end
210
211
 
211
212
  @has_content = @has_indented_content = true # new setting for parent
@@ -290,12 +291,12 @@ class WAX
290
291
  if will_indent
291
292
  write_indent
292
293
  else
293
- write ' '
294
+ out ' '
294
295
  end
295
296
 
296
- write "xmlns"
297
- write(':' + prefix) if has_prefix
298
- write "=\"#{uri}\""
297
+ out "xmlns"
298
+ out(':' + prefix) if has_prefix
299
+ out "=\"#{uri}\""
299
300
 
300
301
  if schema_path != nil
301
302
  @namespace_uri_to_schema_path_map[uri] = schema_path
@@ -331,8 +332,8 @@ class WAX
331
332
  terminate_start
332
333
  write_indent if @parent_stack.size > 0
333
334
 
334
- write "<?#{target} #{data}?>"
335
- write("\n") if will_indent and @parent_stack.size == 0
335
+ out "<?#{target} #{data}?>"
336
+ out("\n") if will_indent and @parent_stack.size == 0
336
337
 
337
338
  self
338
339
  end
@@ -437,7 +438,7 @@ class WAX
437
438
  has_prefix = prefix != nil and prefix.length > 0
438
439
  qname = has_prefix ? prefix + ':' + name : name
439
440
 
440
- write '<' + qname
441
+ out '<' + qname
441
442
 
442
443
  @parent_stack.push(qname)
443
444
 
@@ -455,13 +456,13 @@ class WAX
455
456
  verify_prefixes if @check_me
456
457
  return if @state != :in_start_tag
457
458
  write_schema_locations
458
- write '>'
459
+ out '>'
459
460
  @attr_on_new_line = false # reset
460
461
  @state = :in_element
461
462
  end
462
463
 
463
464
  # Writes text inside the content of the current element.
464
- def text(text, newline=false, escape=@check_me)
465
+ def text(obj, newline=false, escape=@check_me)
465
466
  if @check_me
466
467
  bad_state("text") if @state == :in_prolog or @state == :after_root
467
468
  end
@@ -470,12 +471,14 @@ class WAX
470
471
  @has_indented_content = newline
471
472
  terminate_start
472
473
 
473
- if text != nil and text.length > 0
474
+ text = obj.to_s if obj
475
+
476
+ if obj != nil and text.length > 0
474
477
  write_indent if newline
475
478
  text = XMLUtil.escape(text) if escape
476
- write text
479
+ out text
477
480
  elsif newline
478
- write "\n"
481
+ out "\n"
479
482
  end
480
483
 
481
484
  self
@@ -500,8 +503,8 @@ class WAX
500
503
  end
501
504
 
502
505
  # Writes the to_s value of an Object to the writer.
503
- def write(data)
504
- raise "attempting to write XML after close has been called" unless @writer
506
+ def out(data)
507
+ raise "attempting to out XML after close has been called" unless @writer
505
508
  @writer.write(data.to_s)
506
509
  end
507
510
 
@@ -509,34 +512,34 @@ class WAX
509
512
  def write_doctype(root_element_name)
510
513
  return if @dtd_file_path == nil and @entity_defs.empty?
511
514
 
512
- write "<!DOCTYPE #{root_element_name}"
513
- write " SYSTEM \"#{@dtd_file_path}\"" unless @dtd_file_path == nil
515
+ out "<!DOCTYPE #{root_element_name}"
516
+ out " SYSTEM \"#{@dtd_file_path}\"" unless @dtd_file_path == nil
514
517
 
515
518
  if not @entity_defs.empty?
516
- write " ["
519
+ out " ["
517
520
 
518
521
  @entity_defs.each do |entity_def|
519
- write "\n" + @indent if will_indent
520
- write "<!ENTITY #{entity_def}>"
522
+ out "\n" + @indent if will_indent
523
+ out "<!ENTITY #{entity_def}>"
521
524
  end
522
525
 
523
- write "\n" if will_indent
524
- write ']'
526
+ out "\n" if will_indent
527
+ out ']'
525
528
 
526
529
  @entity_defs.clear
527
530
  end
528
531
 
529
- write '>'
530
- write "\n" if will_indent
532
+ out '>'
533
+ out "\n" if will_indent
531
534
  end
532
535
 
533
536
  # Writes the proper amount of indentation
534
537
  # given the current nesting of elements.
535
538
  def write_indent
536
539
  return unless will_indent
537
- write "\n"
540
+ out "\n"
538
541
  for i in 0...@parent_stack.size
539
- write @indent
542
+ out @indent
540
543
  end
541
544
  end
542
545
 
@@ -576,7 +579,7 @@ class WAX
576
579
  return if version == nil
577
580
  XMLUtil.verify_version(version) if @check_me
578
581
 
579
- write "<?xml version=\"#{version}\" " +
582
+ out "<?xml version=\"#{version}\" " +
580
583
  "encoding=\"#{XMLUtil::DEFAULT_ENCODING}\"?>\n"
581
584
  end
582
585
 
@@ -71,7 +71,7 @@ class WAXTest < Test::Unit::TestCase
71
71
  assert_raise(RuntimeError) do
72
72
  WAX.write do
73
73
  start "root"
74
- end_element
74
+ end!
75
75
  child "child", "text" # can't call child after root is closed
76
76
  end
77
77
  end
@@ -129,7 +129,7 @@ class WAXTest < Test::Unit::TestCase
129
129
 
130
130
  def test_bad_end
131
131
  assert_raise(RuntimeError) do
132
- WAX.write { end_element } # haven't called start yet
132
+ WAX.write { end! } # haven't called start yet
133
133
  end
134
134
  end
135
135
 
@@ -188,7 +188,7 @@ class WAXTest < Test::Unit::TestCase
188
188
  start "parent"
189
189
  namespace "foo", "http://www.ociweb.com/foo"
190
190
  child "foo", "child1", "one"
191
- end_element
191
+ end!
192
192
  child "foo", "child2", "two"
193
193
  end
194
194
  end
@@ -236,7 +236,7 @@ class WAXTest < Test::Unit::TestCase
236
236
  nl_text "text #2"
237
237
  start "child2"
238
238
  attr "a1", "v1"
239
- end_element
239
+ end!
240
240
  nl_text "text #3"
241
241
  end
242
242
 
@@ -355,8 +355,8 @@ class WAXTest < Test::Unit::TestCase
355
355
  WAX.write do
356
356
  set_indent nil
357
357
  start "root"
358
- end_element
359
- end_element
358
+ end!
359
+ end!
360
360
  end
361
361
  end
362
362
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wax
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.4
4
+ version: 0.9.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - R. Mark Volkmann
@@ -22,8 +22,11 @@ extensions: []
22
22
  extra_rdoc_files:
23
23
  - README.rdoc
24
24
  files:
25
+ - lib/address.rb
26
+ - lib/car.rb
25
27
  - lib/cd_demo.rb
26
28
  - lib/instance_exec.rb
29
+ - lib/person.rb
27
30
  - lib/tutorial.rb
28
31
  - lib/wax.rb
29
32
  - lib/xml_util.rb