Conversation
There was a problem hiding this comment.
In ruby, you don't need to have "city = " here. if you wanted to have method that returns "New York", you should:
def city
"New York"
endMore likely, you really wanted to do this (outside of a method)
city = "New York"There was a problem hiding this comment.
Thanks...fixed them .. but on trying a pull request:
Pull request creation failed. Validation failed: A pull request already exists for lorio:master.
but they do work fine. Will move on.
On Aug 26, 2013, at 5:00 PM, Jesse Wolgamott notifications@github.com wrote:
In passenger2.rb:
@@ -0,0 +1,15 @@
+def name
- name = "Lori"
+end
+def city
- city = "New York"
In ruby, you don't need to have "city = " here. if you wanted to have method that returns "New York", you should:def city
"New York"
end
More likely, you really wanted to do this (outside of a method)city = "New York"
—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
GitHub pulls automatically update when you push to the branch you originally created on. So I see the changes you made.
|
Hi! Good job here, it got the job done -- though I think some elements were a bit confusing. Let me know if you have questions: I couldn't follow the reasoning here: train_parts = {}
train_parts[:train] = train
puts "Train:"
train_parts[:train].each #Specifically, I'm not sure the train_parts ever really gets used. If you wanted to see all of the key/values that your train hash had, you should just keep it as: train = {}
train[:city] = "New York"
train[:engines] = 1
train[:cars] = 6
puts "Train:"
train.each do |key, value|
puts " * #{key}: #{value}"
end
puts " * and a caboose." |
There was a problem hiding this comment.
I don't think you want to have the "do" here.
There was a problem hiding this comment.
Sorry. Passenger 3 and train.rb are my new solutions. What is the best way to delete...is it best to delete the earlier tries right from my git repo? Or from my local project directory?
On Aug 27, 2013, at 5:45 PM, Jesse Wolgamott notifications@github.com wrote:
In passenger.rb:
@@ -0,0 +1,16 @@
+
+
+
+
+Passenger = Struct.new(:city, :name) do
I don't think you want to have the "do" here.—
Reply to this email directly or view it on GitHub.
There was a problem hiding this comment.
In future I'll just push my best effort instead of starting new ones.
On Aug 27, 2013, at 5:45 PM, Jesse Wolgamott notifications@github.com
wrote:
In passenger.rb:
@@ -0,0 +1,16 @@
+
+
+
+
+Passenger = Struct.new(:city, :name) do
I don't think you want to have the "do" here.
—
Reply to this email directly or view it on
GitHubhttps://github.com//pull/3/files#r6019436
.
No description provided.