Class: Twurl::RequestController
Constant Summary
collapse
- NO_URI_MESSAGE =
'No URI specified'
- INVALID_URI_MESSAGE =
'Invalid URI detected'
- READ_TIMEOUT_MESSAGE =
'A timeout occurred (Net::ReadTimeout). ' \
'Please try again or increase the value using --timeout option.'
- OPEN_TIMEOUT_MESSAGE =
'A timeout occurred (Net::OpenTimeout). ' \
'Please try again or increase the value using --connection-timeout option.'
Instance Attribute Summary
#client, #options
Instance Method Summary
collapse
dispatch, #initialize
Instance Method Details
#dispatch ⇒ Object
9
10
11
12
13
14
15
16
|
# File 'lib/twurl/request_controller.rb', line 9
def dispatch
if client.needs_to_authorize?
raise Exception, "You need to authorize first."
end
options.path ||= OAuthClient.rcfile.alias_from_options(options)
raise Exception, NO_URI_MESSAGE if options.path.empty?
perform_request
end
|