Class: Pupil::Stream::Hash

Inherits:
Hash
  • Object
show all
Defined in:
lib/pupil/stream/base.rb

Overview

Stream Hash

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(status, event) ⇒ Hash

Returns a new instance of Hash.



104
105
106
107
108
# File 'lib/pupil/stream/base.rb', line 104

def initialize(status, event)
  super()
  self.update(status)
  @event = event
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(action, *args) ⇒ Object



110
111
112
# File 'lib/pupil/stream/base.rb', line 110

def method_missing(action, *args)
  return self[action.to_s] rescue nil
end

Instance Attribute Details

#eventObject (readonly)

Returns the value of attribute event.



102
103
104
# File 'lib/pupil/stream/base.rb', line 102

def event
  @event
end