Sha256: 917bee991c5fe218ef9ea057eeb2e7b0618a48fbd92baacab0182694176244db

Contents?: true

Size: 526 Bytes

Versions: 2

Compression:

Stored size: 526 Bytes

Contents

module EY
  class Account
    class App < Struct.new(:name, :repository_url, :environments, :account)
      def self.from_hash(hash, account)
        new(
          hash["name"],
          hash["repository_uri"], # We use url canonically in the ey gem
          Environment.from_array(hash["environments"], account),
          account
        ) if hash && hash != "null"
      end

      def self.from_array(array, account)
        array.map{|n| from_hash(n, account) } if array && array != "null"
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
engineyard-0.2.11 lib/engineyard/account/app.rb
engineyard-0.2.10 lib/engineyard/account/app.rb