Sha256: 7e2b853c847e08a77aa70a1a1fefba8e2b78b0e2a24e4212d675571d7bd60d12

Contents?: true

Size: 1.2 KB

Versions: 1

Compression:

Stored size: 1.2 KB

Contents

require 'heirloom/catalog/add.rb'
require 'heirloom/catalog/delete.rb'
require 'heirloom/catalog/list.rb'
require 'heirloom/catalog/setup.rb'
require 'heirloom/catalog/show.rb'
require 'heirloom/catalog/verify.rb'

module Heirloom
  class Catalog

    def initialize(args)
      @config  = args[:config]
      @name    = args[:name]
    end

    def create_catalog_domain
      setup.create_catalog_domain
    end

    def delete_from_catalog
      delete.delete_from_catalog
    end

    def add_to_catalog(args)
      add.add_to_catalog args
    end

    def regions
      show.regions
    end

    def base
      show.base
    end

    def all
      list.all
    end

    private

    def add
      @add ||= Catalog::Add.new :config => @config,
                                :name   => @name
    end

    def delete
      @delete ||= Catalog::Delete.new :config => @config,
                                      :name   => @name
    end

    def list
      @list ||= Catalog::List.new :config => @config
    end

    def setup
      @setup ||= Catalog::Setup.new :config => @config
    end

    def show
      @show ||= Catalog::Show.new :config => @config,
                                  :name   => @name
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
heirloom-0.7.0rc1 lib/heirloom/catalog.rb