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
airbrake-3.1.13 lib/airbrake/cli/project.rb
airbrake-3.1.12 lib/airbrake/cli/project.rb
airbrake-3.1.11 lib/airbrake/cli/project.rb
airbrake-3.1.10 lib/airbrake/cli/project.rb
airbrake-3.1.9 lib/airbrake/cli/project.rb
airbrake-3.1.8 lib/airbrake/cli/project.rb
airbrake-3.1.7 lib/airbrake/cli/project.rb
airbrake-3.1.6 lib/airbrake/cli/project.rb