Sha256: d9ccb7ec45cf134fd57dd65c8621c6dde763e4ec0c3d97ec47d69ce122021d87
Contents?: true
Size: 651 Bytes
Versions: 13
Compression:
Stored size: 651 Bytes
Contents
module EY module Model class App < ApiStruct.new(:id, :account, :name, :repository_uri, :environments, :api) def self.from_hash(hash) super.tap do |app| app.environments = Environment.from_array(app.environments, :api => app.api) app.account = Account.from_hash(app.account) end end def self.from_array(*) Collection::Apps[*super] end def sole_environment if environments.size == 1 environments.first end end def sole_environment! sole_environment or raise NoSingleEnvironmentError.new(self) end end end end
Version data entries
13 entries across 13 versions & 1 rubygems