Class: Fare::Configuration::SubscriberConfiguration
- Inherits:
-
Object
- Object
- Fare::Configuration::SubscriberConfiguration
- Defined in:
- lib/fare/configuration.rb
Instance Attribute Summary collapse
-
#always_run ⇒ Object
Returns the value of attribute always_run.
-
#setup ⇒ Object
Returns the value of attribute setup.
-
#stacks ⇒ Object
Returns the value of attribute stacks.
Instance Method Summary collapse
-
#initialize(name) ⇒ SubscriberConfiguration
constructor
A new instance of SubscriberConfiguration.
- #load_setup ⇒ Object
- #topics ⇒ Object
Constructor Details
#initialize(name) ⇒ SubscriberConfiguration
Returns a new instance of SubscriberConfiguration.
39 40 41 42 43 44 |
# File 'lib/fare/configuration.rb', line 39 def initialize(name) @name = name @stacks = [] @setup = Proc.new {} @always_run = Proc.new {} end |
Instance Attribute Details
#always_run ⇒ Object
Returns the value of attribute always_run.
37 38 39 |
# File 'lib/fare/configuration.rb', line 37 def always_run @always_run end |
#setup ⇒ Object
Returns the value of attribute setup.
37 38 39 |
# File 'lib/fare/configuration.rb', line 37 def setup @setup end |
#stacks ⇒ Object
Returns the value of attribute stacks.
37 38 39 |
# File 'lib/fare/configuration.rb', line 37 def stacks @stacks end |
Instance Method Details
#load_setup ⇒ Object
50 51 52 |
# File 'lib/fare/configuration.rb', line 50 def load_setup @setup.call end |
#topics ⇒ Object
46 47 48 |
# File 'lib/fare/configuration.rb', line 46 def topics stacks.map(&:topics).flatten end |