Skip to content

Commit

Permalink
[FEATURE] Menu should respond to #result with a string representation…
Browse files Browse the repository at this point in the history
… of the digit buffer
  • Loading branch information
benlangfeld committed Mar 16, 2012
1 parent c60c10d commit effd020
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Expand Up @@ -7,7 +7,7 @@
* Feature: `CallControll#join` can be made non-blocking by passing `:async => true`
* Feature: `CallController#ask` now supports `:terminator` and `:limit` options to add early termination by terminator digit or digit limit conditions
* Feature: `CallController#ask` may now have prompt interruptibility configured using `:interruptible => false`
* Change: `CallController#ask` now returns a menu object for establishing completion mode, etc
* Change: `CallController#ask` now returns a menu object for establishing completion mode, input buffer (#result), etc

# 2.0.0.beta1 - 2012-03-07
* Bugfix: #speak now correctly casts the argument to string if it is not SSML
Expand Down
1 change: 1 addition & 0 deletions lib/adhearsion/menu_dsl/menu.rb
Expand Up @@ -35,6 +35,7 @@ def digit_buffer
def digit_buffer_string
digit_buffer.to_s
end
alias :result :digit_buffer_string

def digit_buffer_empty?
digit_buffer.empty?
Expand Down
1 change: 1 addition & 0 deletions spec/adhearsion/menu_dsl/menu_spec.rb
Expand Up @@ -114,6 +114,7 @@ module MenuDSL
it "should add a digit to the buffer" do
subject << 'a'
subject.digit_buffer.should be == 'a'
subject.result.should be == 'a'
end
end

Expand Down

0 comments on commit effd020

Please sign in to comment.