class Murk::Model::StackCollection

Public Class Methods

new(stacks = nil) click to toggle source
# File lib/murk/model/stack_collection.rb, line 8
def initialize(stacks = nil)
  @stacks = stacks || []
end

Public Instance Methods

add(stack) click to toggle source
# File lib/murk/model/stack_collection.rb, line 12
def add(stack)
  @stacks << stack
end
each(&block) click to toggle source
# File lib/murk/model/stack_collection.rb, line 16
def each(&block)
  @stacks.each(&block)
end
find_by_name(name, env: nil) click to toggle source
# File lib/murk/model/stack_collection.rb, line 20
def find_by_name(name, env: nil)
  find do |stack|
    stack.name == name && stack.env == env
  end
end