Class: Twterm::Event::AbstractEvent
- Inherits:
-
Object
- Object
- Twterm::Event::AbstractEvent
- Includes:
- Utils
- Defined in:
- lib/twterm/event/abstract_event.rb
Direct Known Subclasses
DirectMessage::Fetched, Message::AbstractMessage, Notification::AbstractNotification, OpenPhoto, OpenURI, Screen::Refresh, Screen::Resize, Status::AbstractStatusEvent, StatusDeleted, StatusGarbageCollected, UserGarbageCollected
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize(*args) ⇒ AbstractEvent
constructor
A new instance of AbstractEvent.
Methods included from Utils
Constructor Details
#initialize(*args) ⇒ AbstractEvent
Returns a new instance of AbstractEvent.
8 9 10 11 12 13 14 15 |
# File 'lib/twterm/event/abstract_event.rb', line 8 def initialize(*args) fields.zip(args).map(&:flatten).each do |name, type, value| check_type type, value instance_variable_set('@%s' % name, value) self.class.send(:attr_reader, name) end end |
Instance Method Details
#fields ⇒ Object
17 18 19 |
# File 'lib/twterm/event/abstract_event.rb', line 17 def fields [] end |