Class: ActionSlack::Configuration
- Inherits:
-
Object
- Object
- ActionSlack::Configuration
- Defined in:
- lib/action_slack/configuration.rb
Instance Attribute Summary collapse
-
#async ⇒ Object
Returns the value of attribute async.
-
#filepath ⇒ Object
Returns the value of attribute filepath.
Class Method Summary collapse
Instance Method Summary collapse
- #async? ⇒ Boolean
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
23 24 25 |
# File 'lib/action_slack/configuration.rb', line 23 def initialize @configuration = self.class.default_configuration.dup end |
Instance Attribute Details
#async ⇒ Object
Returns the value of attribute async.
5 6 7 |
# File 'lib/action_slack/configuration.rb', line 5 def async @async end |
#filepath ⇒ Object
Returns the value of attribute filepath.
5 6 7 |
# File 'lib/action_slack/configuration.rb', line 5 def filepath @filepath end |
Class Method Details
.default_configuration ⇒ Object
19 20 21 |
# File 'lib/action_slack/configuration.rb', line 19 def self.default_configuration @default_configuration ||= {} end |
.set_default(name, default) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/action_slack/configuration.rb', line 7 def self.set_default(name, default) define_method name do @configuration[name] end define_method :"#{name}=" do |value| @configuration[name] = value end default_configuration[name] = default end |
Instance Method Details
#async? ⇒ Boolean
27 28 29 |
# File 'lib/action_slack/configuration.rb', line 27 def async? async end |