Class: Miasma::Models::Orchestration::Stacks
- Inherits:
-
Types::Collection
- Object
- Types::Collection
- Miasma::Models::Orchestration::Stacks
- Defined in:
- lib/miasma/models/orchestration/stacks.rb
Overview
Abstract stack collection
Instance Attribute Summary
Attributes inherited from Types::Collection
Instance Method Summary collapse
-
#filter(options = {}) ⇒ Array<Stack>
Return stacks matching given filter.
-
#get(ident) ⇒ Stack
Locate stack by name or ID.
-
#model ⇒ Stack
Collection items class.
Methods inherited from Types::Collection
#all, #build, #from_json, #initialize, #reload, #to_json
Methods included from Utils::Memoization
#_memo, #clear_memoizations!, #memoize, #unmemoize
Constructor Details
This class inherits a constructor from Miasma::Types::Collection
Instance Method Details
#filter(options = {}) ⇒ Array<Stack>
Return stacks matching given filter
26 27 28 |
# File 'lib/miasma/models/orchestration/stacks.rb', line 26 def filter(={}) raise NotImplementedError end |
#get(ident) ⇒ Stack
Locate stack by name or ID
14 15 16 17 18 19 |
# File 'lib/miasma/models/orchestration/stacks.rb', line 14 def get(ident) all.detect do |stack| stack.id.to_s == ident.to_s || stack.name.to_s == ident.to_s end end |