Class: Twterm::Event::Base
- Inherits:
-
Object
- Object
- Twterm::Event::Base
- Includes:
- Utils
- Defined in:
- lib/twterm/event/base.rb
Direct Known Subclasses
DirectMessage::Fetched, Favorite, Follow, Notification, OpenURI, Screen::Resize, Status::Base
Instance Method Summary collapse
- #fields ⇒ Object
-
#initialize(*args) ⇒ Base
constructor
A new instance of Base.
Methods included from Utils
Constructor Details
#initialize(*args) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 14 15 |
# File 'lib/twterm/event/base.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/base.rb', line 17 def fields [] end |