Class: Mammoth::Runtimes::Adapter
- Inherits:
-
Object
- Object
- Mammoth::Runtimes::Adapter
- Defined in:
- lib/mammoth/runtimes/adapter.rb
Overview
Base contract for delivery runtime adapters.
Direct Known Subclasses
Class Method Summary collapse
-
.adapter_type ⇒ String
Adapter type name.
-
.capabilities ⇒ Hash
JSON-friendly adapter capabilities.
Instance Method Summary collapse
- #initialize ⇒ void constructor
Constructor Details
#initialize ⇒ void
9 |
# File 'lib/mammoth/runtimes/adapter.rb', line 9 def initialize; end |
Class Method Details
.adapter_type ⇒ String
Returns adapter type name.
17 18 19 20 |
# File 'lib/mammoth/runtimes/adapter.rb', line 17 def self.adapter_type type = name.split("::").last.to_s.delete_suffix("Adapter").downcase type.empty? ? "adapter" : type end |
.capabilities ⇒ Hash
Returns JSON-friendly adapter capabilities.
12 13 14 |
# File 'lib/mammoth/runtimes/adapter.rb', line 12 def self.capabilities { type: adapter_type } end |