Skip to content

Commit

Permalink
Changed question3.rb to return text
Browse files Browse the repository at this point in the history
  • Loading branch information
halferty committed Apr 25, 2012
1 parent 97be1e7 commit f406845
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
9 changes: 4 additions & 5 deletions controllers/question3.rb
Expand Up @@ -2,13 +2,12 @@

get '/question3/:population' do

@population = params[:population].to_i
@total, @numbers, @letters, @excess = calc(@population)
population = params[:population].to_i
total, numbers, letters, excess = calc(population)

@pattern = patternify(@numbers, @letters)
pattern = patternify(numbers, letters)

@title = 'Question 3 - license plate calculation'
erb :results
pattern + "|" + total + "|" + excess
end


5 changes: 4 additions & 1 deletion views/index.erb
@@ -1 +1,4 @@
<p>Testing</p><h2>Testing</h2>
<p>Greetings IGN,</p>
<p>I'm a self-taught programmer, with a strong interest in the business and development of games.</p>
<p>Question 3 seems to indicate that the license plates will have a
number of characters, and each character can have a range of 0-9 or A-Z. </p>

0 comments on commit f406845

Please sign in to comment.