Class: HealthBit::Formatter
- Inherits:
-
Object
- Object
- HealthBit::Formatter
- Defined in:
- lib/health_bit/formatter.rb
Overview
rubocop:disable Lint/UnusedMethodArgument
Instance Method Summary collapse
- #code_failure(error, env, health_bit) ⇒ Object
- #code_success(env, health_bit) ⇒ Object
- #format_failure(error, env, health_bit) ⇒ Object
- #format_success(error, env, health_bit) ⇒ Object
- #headers_failure(error, env, health_bit) ⇒ Object
- #headers_success(env, health_bit) ⇒ Object
Instance Method Details
#code_failure(error, env, health_bit) ⇒ Object
46 47 48 |
# File 'lib/health_bit/formatter.rb', line 46 def code_failure(error, env, health_bit) health_bit.fail_code end |
#code_success(env, health_bit) ⇒ Object
39 40 41 |
# File 'lib/health_bit/formatter.rb', line 39 def code_success(env, health_bit) health_bit.success_code end |
#format_failure(error, env, health_bit) ⇒ Object
19 20 21 22 |
# File 'lib/health_bit/formatter.rb', line 19 def format_failure(error, env, health_bit) format = health_bit.show_backtrace ? CheckError::FORMAT_FULL : CheckError::FORMAT_SHORT error.to_s(format) end |
#format_success(error, env, health_bit) ⇒ Object
12 13 14 |
# File 'lib/health_bit/formatter.rb', line 12 def format_success(error, env, health_bit) health_bit.success_text end |
#headers_failure(error, env, health_bit) ⇒ Object
33 34 35 |
# File 'lib/health_bit/formatter.rb', line 33 def headers_failure(error, env, health_bit) health_bit.headers end |
#headers_success(env, health_bit) ⇒ Object
26 27 28 |
# File 'lib/health_bit/formatter.rb', line 26 def headers_success(env, health_bit) health_bit.headers end |