Module: Pvectl::Commands::Top::ResourceHandler Abstract
- Included in:
- Handlers::Containers, Handlers::Nodes, Handlers::Vms
- Defined in:
- lib/pvectl/commands/top/resource_handler.rb
Overview
This module is abstract.
Include in handler class and implement required methods.
Interface module for Top command handlers.
Each handler wraps a Get handler and returns a Top-specific presenter for metrics-focused display (CPU%, MEM%, etc.).
Instance Method Summary collapse
-
#list(**options) ⇒ Array<Object>
Lists resources with optional sorting.
-
#presenter ⇒ Presenters::Base
Returns the Top-specific presenter for this resource type.
Instance Method Details
#list(**options) ⇒ Array<Object>
Lists resources with optional sorting.
32 33 34 |
# File 'lib/pvectl/commands/top/resource_handler.rb', line 32 def list(**) raise NotImplementedError, "#{self.class}#list must be implemented" end |
#presenter ⇒ Presenters::Base
Returns the Top-specific presenter for this resource type.
40 41 42 |
# File 'lib/pvectl/commands/top/resource_handler.rb', line 40 def presenter raise NotImplementedError, "#{self.class}#presenter must be implemented" end |