Skip to content
This repository

Make James.listen work with no arguments like in the examples #9

Merged
merged 1 commit into from almost 3 years ago

2 participants

Mark Rada Florian R. Hanke
Mark Rada

In the examples, you have:

require 'rubygems'
require 'james'

# Your dialog goes here.

# This is needed to start James.
#
James.listen

Except that James.listen expects an argument to be passed so it can then pass it to James::Controller.instance.

In turn, James::Controller.instance does supply the default value for its argument.

I'm not sure if you meant for only James.listen to have a default value or both. In either case, this patch makes the example code work.

Florian R. Hanke floere merged commit c83a1c0 into from
Florian R. Hanke floere closed this
Florian R. Hanke
Owner
floere commented

Thank you! Both should have a default value.

Florian R. Hanke
Owner
floere commented

Released in 0.7.1.

Florian R. Hanke
Owner
floere commented

Also added you to the contributors list :) Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Jul 18, 2011
Mark Rada ferrous26 Make James.listen work with no arguments like in the examples 71c0eea
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. +1 1  lib/james.rb
2  lib/james.rb
@@ -39,7 +39,7 @@ def self.use *dialogs
39 39
40 40 # Start listening.
41 41 #
42   - def self.listen options
  42 + def self.listen options = {}
43 43 controller.listen options
44 44 end
45 45

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.