Class: Eventify
- Inherits:
-
Object
- Object
- Eventify
- Defined in:
- lib/eventify.rb,
lib/eventify/version.rb,
lib/eventify/provider/base.rb
Defined Under Namespace
Modules: Provider Classes: Configuration, Database, Mail
Constant Summary collapse
- VERSION =
"1.2.2"
Instance Attribute Summary collapse
-
#configuration ⇒ Object
readonly
Returns the value of attribute configuration.
- #providers ⇒ Object
Instance Method Summary collapse
- #all_events ⇒ Object
-
#initialize(configuration = Eventify::Configuration.new) ⇒ Eventify
constructor
A new instance of Eventify.
- #new_events ⇒ Object
- #process_new_events ⇒ Object
Constructor Details
#initialize(configuration = Eventify::Configuration.new) ⇒ Eventify
Returns a new instance of Eventify.
14 15 16 |
# File 'lib/eventify.rb', line 14 def initialize(configuration=Eventify::Configuration.new) @configuration = configuration end |
Instance Attribute Details
#configuration ⇒ Object (readonly)
Returns the value of attribute configuration.
12 13 14 |
# File 'lib/eventify.rb', line 12 def configuration @configuration end |
Instance Method Details
#all_events ⇒ Object
18 19 20 |
# File 'lib/eventify.rb', line 18 def all_events @all_events ||= providers.flat_map(&:fetch).uniq end |
#new_events ⇒ Object
22 23 24 |
# File 'lib/eventify.rb', line 22 def new_events @new_events ||= all_events.reject(&:exists?) end |