Class: StatusCat::Checkers::Base
- Inherits:
-
Object
- Object
- StatusCat::Checkers::Base
- Extended by:
- ActiveSupport::DescendantsTracker
- Defined in:
- lib/status_cat/checkers/base.rb
Direct Known Subclasses
ActionMailer, ActiveRecord, DelayedJob, Fitbit, GoogleCivic, Profilesio, S3, SendHub, Slack, Stripe, Twilio
Constant Summary collapse
- FORMAT =
"%s | %s | %s\n".freeze
Instance Attribute Summary collapse
-
#status ⇒ Object
readonly
Returns the value of attribute status.
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#status ⇒ Object (readonly)
Returns the value of attribute status.
8 9 10 |
# File 'lib/status_cat/checkers/base.rb', line 8 def status @status end |
#value ⇒ Object (readonly)
Returns the value of attribute value.
8 9 10 |
# File 'lib/status_cat/checkers/base.rb', line 8 def value @value end |
Class Method Details
.class_to_name(klass) ⇒ Object
10 11 12 |
# File 'lib/status_cat/checkers/base.rb', line 10 def self.class_to_name(klass) klass.to_s.split('::').last.underscore.to_sym end |
Instance Method Details
#name ⇒ Object
14 15 16 17 |
# File 'lib/status_cat/checkers/base.rb', line 14 def name Base.class_to_name(self.class) # self.class.to_s.split('::').last.underscore.to_sym end |
#to_s(format = FORMAT) ⇒ Object
19 20 21 |
# File 'lib/status_cat/checkers/base.rb', line 19 def to_s(format = FORMAT) format(format, name, value, status || I18n.t(:ok, scope: :status_cat)) end |