Class: Cheetah::EventReceiver
- Inherits:
-
Object
- Object
- Cheetah::EventReceiver
- Defined in:
- lib/cheetah/services/event_receiver.rb
Instance Attribute Summary collapse
-
#data ⇒ Object
readonly
Returns the value of attribute data.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(data) ⇒ EventReceiver
constructor
A new instance of EventReceiver.
- #receive! ⇒ Object
Constructor Details
#initialize(data) ⇒ EventReceiver
Returns a new instance of EventReceiver.
5 6 7 |
# File 'lib/cheetah/services/event_receiver.rb', line 5 def initialize(data) @data = data end |
Instance Attribute Details
#data ⇒ Object (readonly)
Returns the value of attribute data.
3 4 5 |
# File 'lib/cheetah/services/event_receiver.rb', line 3 def data @data end |
Class Method Details
.receive!(data) ⇒ Object
9 10 11 |
# File 'lib/cheetah/services/event_receiver.rb', line 9 def self.receive!(data) new(data).receive! end |
Instance Method Details
#receive! ⇒ Object
13 14 15 16 17 |
# File 'lib/cheetah/services/event_receiver.rb', line 13 def receive! return if invalid? Cheetah::FileDownloader.download!(invoice) end |