Method: Docker::Event#initialize
- Defined in:
- lib/docker/event.rb
#initialize(event_attributes = {}) ⇒ Event
Returns a new instance of Event.
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/docker/event.rb', line 54 def initialize(event_attributes = {}) [:Type, :Action, :Actor, :time, :timeNano, :status, :from].each do |sym| value = event_attributes[sym] if value.nil? value = event_attributes[sym.to_s] end send("#{sym}=", value) end if @Actor.nil? value = event_attributes[:id] if value.nil? value = event_attributes['id'] end self.Actor = Actor.new(ID: value) end end |