Class: SearchKit::Messages
- Inherits:
-
Object
- Object
- SearchKit::Messages
show all
- Includes:
- Messaging
- Defined in:
- lib/search_kit/messages.rb,
lib/search_kit/messages/messaging.rb
Defined Under Namespace
Modules: Messaging
Instance Method Summary
collapse
Methods included from Messaging
#info, #password_prompt, #prompt, #warning
Instance Method Details
#bad_request ⇒ Object
13
14
15
|
# File 'lib/search_kit/messages.rb', line 13
def bad_request
warning(I18n.t('http.400'))
end
|
#json_parse_error(type = 'Argument') ⇒ Object
22
23
24
25
|
# File 'lib/search_kit/messages.rb', line 22
def json_parse_error(type = 'Argument')
message = I18n.t('cli.errors.json_parse', type: type)
warning(message)
end
|
#no_service ⇒ Object
27
28
29
30
|
# File 'lib/search_kit/messages.rb', line 27
def no_service
message = I18n.t('cli.errors.no_service', uri: SearchKit.config.app_uri)
warning(message)
end
|
#not_found(type = 'Resource') ⇒ Object
17
18
19
20
|
# File 'lib/search_kit/messages.rb', line 17
def not_found(type = 'Resource')
message = I18n.t('http.404', type: type)
warning(message)
end
|
#unauthorized ⇒ Object
9
10
11
|
# File 'lib/search_kit/messages.rb', line 9
def unauthorized
warning(I18n.t('http.401'))
end
|
#unprocessable ⇒ Object
32
33
34
|
# File 'lib/search_kit/messages.rb', line 32
def unprocessable
warning(I18n.t('http.422'))
end
|
#unreadable(error) ⇒ Object
36
37
38
|
# File 'lib/search_kit/messages.rb', line 36
def unreadable(error)
warning(I18n.t('cli.errors.unreadable', error: error))
end
|