Sha256: e7fc386f3128142a39f35ba11159c94a7eb19a1a6520ada82a39b93d52cc4910

Contents?: true

Size: 498 Bytes

Versions: 6

Compression:

Stored size: 498 Bytes

Contents

module Mulder
  class Client

    attr_reader :app, :role, :environment

    def initialize(connection, app, environment, role)
      @connection  = connection
      @app         = app
      @environment = environment
      @role        = role
    end

    def group
      @connection.group_by_id_regexp(id_regexp)
    end

    def instances
      @connection.instances_by_group(group)
    end

    private

      def id_regexp
        /^#{@app}-#{@environment}-#{@role}-.*$/i
      end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
mulder-0.1.0 lib/mulder/client.rb
mulder-0.0.5 lib/mulder/client.rb
mulder-0.0.4 lib/mulder/client.rb
mulder-0.0.3 lib/mulder/client.rb
mulder-0.0.2 lib/mulder/client.rb
mulder-0.0.1 lib/mulder/client.rb