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