Class: Wisper::Configuration
- Inherits:
-
Object
- Object
- Wisper::Configuration
- Defined in:
- lib/wisper/configuration.rb
Defined Under Namespace
Classes: Broadcasters
Instance Attribute Summary collapse
-
#broadcasters ⇒ Object
readonly
Returns the value of attribute broadcasters.
Instance Method Summary collapse
-
#broadcaster(key, broadcaster) ⇒ Object
registers a broadcaster, referenced by key.
-
#default_prefix=(value) ⇒ String
sets the default value for prefixes.
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
7 8 9 |
# File 'lib/wisper/configuration.rb', line 7 def initialize @broadcasters = Broadcasters.new end |
Instance Attribute Details
#broadcasters ⇒ Object (readonly)
Returns the value of attribute broadcasters.
5 6 7 |
# File 'lib/wisper/configuration.rb', line 5 def broadcasters @broadcasters end |
Instance Method Details
#broadcaster(key, broadcaster) ⇒ Object
registers a broadcaster, referenced by key
15 16 17 18 |
# File 'lib/wisper/configuration.rb', line 15 def broadcaster(key, broadcaster) @broadcasters[key] = broadcaster self end |
#default_prefix=(value) ⇒ String
sets the default value for prefixes
25 26 27 |
# File 'lib/wisper/configuration.rb', line 25 def default_prefix=(value) ValueObjects::Prefix.default = value end |