Class: What::Modules::Base
- Inherits:
-
Object
- Object
- What::Modules::Base
- Defined in:
- lib/what/modules/base.rb
Direct Known Subclasses
Instance Method Summary collapse
- #check! ⇒ Object
- #details ⇒ Object
- #health ⇒ Object
-
#initialize ⇒ Base
constructor
A new instance of Base.
- #name ⇒ Object
- #status ⇒ Object
Constructor Details
Instance Method Details
#check! ⇒ Object
10 11 12 |
# File 'lib/what/modules/base.rb', line 10 def check! raise "Module #{self.class.name} doesn't override 'check!'" end |
#details ⇒ Object
22 23 24 |
# File 'lib/what/modules/base.rb', line 22 def details {} end |
#health ⇒ Object
18 19 20 |
# File 'lib/what/modules/base.rb', line 18 def health raise "Module #{self.class.name} doesn't override 'health'" end |
#name ⇒ Object
6 7 8 |
# File 'lib/what/modules/base.rb', line 6 def name What::Helpers.underscore(self.class.name.split('::').last) end |
#status ⇒ Object
14 15 16 |
# File 'lib/what/modules/base.rb', line 14 def status { :health => health }.merge(details) end |