Sha256: ae3acfeb89f53e8280267f8683fce1dc9c40c1f85420f98fab09b30c7cd1e3a7

Contents?: true

Size: 812 Bytes

Versions: 3

Compression:

Stored size: 812 Bytes

Contents

module Timber
  class CLI
    class API
      class Application
        DEVELOPMENT = "development".freeze
        HEROKU = "heroku".freeze

        attr_accessor :api_key, :environment, :framework_type, :heroku_drain_url,
          :name, :platform_type

        def initialize(attributes)
          @api_key = attributes.fetch("api_key")
          @environment = attributes.fetch("environment")
          @framework_type = attributes.fetch("framework_type")
          @heroku_drain_url = attributes.fetch("heroku_drain_url")
          @name = attributes.fetch("name")
          @platform_type = attributes.fetch("platform_type")
        end

        def development?
          environment == DEVELOPMENT
        end

        def heroku?
          platform_type == HEROKU
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
timber-2.1.0.rc3 lib/timber/cli/api/application.rb
timber-2.1.0.rc2 lib/timber/cli/api/application.rb
timber-2.1.0.rc1 lib/timber/cli/api/application.rb