Sha256: 3405bef1cb8ee07d6e3ee78b7ba3ce36e2cb2af618a7bd8c632a12ef7745d5c4

Contents?: true

Size: 518 Bytes

Versions: 23

Compression:

Stored size: 518 Bytes

Contents

require 'dm-core'

class Environment
  include DataMapper::Resource

  property :id, Serial
  property :name, String
  property :ssh_username, String
  property :app_server_stack_name, String
  property :load_balancer_ip_address, String
  property :framework_env, String

  belongs_to :account
  has n, :app_environments
  has n, :apps, :through => :app_environments
  has n, :instances

  def inspect
    "#<Environment name:#{name} account:#{account.name}>"
  end

  def instances_count
    instances.size
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
engineyard-cloud-client-2.1.1 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-2.1.0 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.16 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-2.0.1 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-2.0.0 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.15 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.14 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.13 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.12 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.11 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.10 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.9 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.8 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.7 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.6 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.5 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.4 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.3 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.2 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb
engineyard-cloud-client-1.0.1 lib/engineyard-cloud-client/test/fake_awsm/models/environment.rb