Class: Nephelae::Plugin
- Inherits:
-
Object
- Object
- Nephelae::Plugin
- Defined in:
- lib/nephelae/plugins/plugin.rb
Direct Known Subclasses
DiskSpace, MemUsage, NephelaeProcess, PassengerStatus, RedisStatus
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
Instance Method Summary collapse
- #get_metrics ⇒ Object
-
#initialize(config = {}) ⇒ Plugin
constructor
A new instance of Plugin.
- #namespace ⇒ Object
Constructor Details
#initialize(config = {}) ⇒ Plugin
Returns a new instance of Plugin.
6 7 8 |
# File 'lib/nephelae/plugins/plugin.rb', line 6 def initialize(config = {}) @config = config end |
Instance Attribute Details
#config ⇒ Object
Returns the value of attribute config.
4 5 6 |
# File 'lib/nephelae/plugins/plugin.rb', line 4 def config @config end |
Instance Method Details
#get_metrics ⇒ Object
10 11 12 13 |
# File 'lib/nephelae/plugins/plugin.rb', line 10 def get_metrics metrics = Metrics.new(namespace) return metrics end |
#namespace ⇒ Object
15 16 17 |
# File 'lib/nephelae/plugins/plugin.rb', line 15 def namespace namespace = config[:namespace] || default_namespace end |