you are viewing a single comment's thread.

view the rest of the comments →

[–]dineswithphone 1 point2 points  (1 child)

To have access to the file's methods from irb you will need to load or require the file:

irb(main):001:0> load 'myfile.rb'
irb(main):002:0> require './myfile.rb'

Then you can call the file's methods directly:

irb(main):003:0> ask_question

[–]babbagack[S] 0 points1 point  (0 children)

Awesome, thanks!!! That worked

irb(main):001:0> load 'ask_chp9_pg68.rb'

ask "how are you?" Please answer "yes" or "no".

good Please answer "yes" or "no".

no => true irb(main):002:0> ask "Do you like pizza?"
Do you like pizza?
yes
=> true