Sha256: 15bea0348aad16a3326bd3529e9cb16a1edf096c7749628c5c445bc40573c956

Contents?: true

Size: 324 Bytes

Versions: 28

Compression:

Stored size: 324 Bytes

Contents

class Project
  attr_writer :name, :id, :api_key

  def initialize(attributes = {})
    attributes.keys.each do |key|
      instance_variable_set("@#{key}",attributes[key])
    end
  end

  def to_s
    "#{@name}".rjust(20) + "(#{@id}):".rjust(10) + " #{@api_key}"
  end

  def valid?
    @name && @id && @api_key
  end
end

Version data entries

28 entries across 28 versions & 2 rubygems

Version Path
airbrakeV4rails5-4.3.8 lib/airbrake/cli/project.rb
airbrake-4.3.8 lib/airbrake/cli/project.rb
airbrake-4.3.7 lib/airbrake/cli/project.rb
airbrake-4.3.6 lib/airbrake/cli/project.rb
airbrake-4.3.5 lib/airbrake/cli/project.rb
airbrake-4.3.4 lib/airbrake/cli/project.rb
airbrake-4.3.3 lib/airbrake/cli/project.rb
airbrake-4.3.2 lib/airbrake/cli/project.rb
airbrake-4.3.1 lib/airbrake/cli/project.rb
airbrake-4.3.0 lib/airbrake/cli/project.rb
airbrake-4.2.1 lib/airbrake/cli/project.rb
airbrake-4.2.0 lib/airbrake/cli/project.rb
airbrake-4.1.0 lib/airbrake/cli/project.rb
airbrake-4.0.0 lib/airbrake/cli/project.rb
airbrake-3.2.1 lib/airbrake/cli/project.rb
airbrake-3.2.0 lib/airbrake/cli/project.rb
airbrake-3.1.17 lib/airbrake/cli/project.rb
airbrake-3.1.16 lib/airbrake/cli/project.rb
airbrake-3.1.15 lib/airbrake/cli/project.rb
airbrake-3.1.14 lib/airbrake/cli/project.rb