Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce the concept of application specific config
Similar to a plugin, an Application can specify config and an initialiser, and is the place to put such application-wide and unshareable things.
- Loading branch information
1 parent
4a76353
commit 5a0a969
Showing
5 changed files
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# encoding: utf-8 | ||
|
||
require 'adhearsion/plugin' | ||
|
||
class Adhearsion::Application < Adhearsion::Plugin | ||
alias :name :plugin_name | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# encoding: utf-8 | ||
|
||
class DemoApp < Adhearsion::Application | ||
name :demo | ||
|
||
# Actions to perform when initialising the application | ||
# | ||
init do | ||
logger.info "This is the Adhearsion Demo application as generated by `ahn create`. It should work well on FreeSWITCH, and will soon also work on Asterisk." | ||
end | ||
|
||
# Basic configuration for the application | ||
# | ||
config do | ||
greeting "Hello. Welcome to the Simon Game. Lets play.", desc: "What to use to greet users before playing the Simon Game" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters