Class: TurboChat::Configuration::Scope
- Inherits:
-
Object
- Object
- TurboChat::Configuration::Scope
- Defined in:
- lib/turbo_chat/configuration.rb
Direct Known Subclasses
Class Attribute Summary collapse
-
.scope_defaults ⇒ Object
readonly
Returns the value of attribute scope_defaults.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize ⇒ Scope
constructor
A new instance of Scope.
Constructor Details
#initialize ⇒ Scope
Returns a new instance of Scope.
21 22 23 24 25 |
# File 'lib/turbo_chat/configuration.rb', line 21 def initialize self.class.scope_defaults.each do |attribute, default_value| instance_variable_set("@#{attribute}", TurboChat::Configuration.resolve_default_value(default_value)) end end |
Class Attribute Details
.scope_defaults ⇒ Object (readonly)
Returns the value of attribute scope_defaults.
13 14 15 |
# File 'lib/turbo_chat/configuration.rb', line 13 def scope_defaults @scope_defaults end |
Class Method Details
.configure_defaults(defaults) ⇒ Object
15 16 17 18 |
# File 'lib/turbo_chat/configuration.rb', line 15 def configure_defaults(defaults) @scope_defaults = defaults attr_accessor(*defaults.keys) end |