Skip to content

Commit 71bf3cb

Browse files
committed
First Homework Change
Turned x into an array. Added function that counted number of numbers in array. Changed template variable to m.
1 parent c31e16a commit 71bf3cb

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

erb_example.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
require 'erb'
2-
3-
x = 42
4-
template = ERB.new "The value of x is: <%= x %>"
5-
puts template.result(binding)
2+
x = ['2','3','99999999999999']
3+
y=x.count
4+
n = ERB.new "The value of x is: <%= x %>"
5+
puts n.result(binding)
6+
m = ERB.new "The number of numbers in this array is: <%= y %>"
7+
puts m.result(binding)

0 commit comments

Comments
 (0)