Module: Twterm::Utils
- Included in:
- Event::AbstractEvent, EventDispatcher, Publisher, Tab::Statuses::AbstractStatusesTab, Tab::Statuses::Home, TabManager
- Defined in:
- lib/twterm/utils.rb
Class Method Summary collapse
Class Method Details
.check_type(expected_type, argument) ⇒ Object
5 6 7 8 9 10 11 |
# File 'lib/twterm/utils.rb', line 5 def check_type(expected_type, argument) return if argument.is_a?(expected_type) raise TypeError, 'TypeError: wrong argument type %s (expected %s)' % [ argument.class, expected_type ] end |