Class: Student

Inherits:
Object
  • Object
show all
Defined in:
lib/work_together/student.rb

Constant Summary collapse

@@all =
[]

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, progress) ⇒ Student

Returns a new instance of Student.



7
8
9
10
11
# File 'lib/work_together/student.rb', line 7

def initialize(name, progress)
  @name = name
  @progress = progress
  @@all << self
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



5
6
7
# File 'lib/work_together/student.rb', line 5

def name
  @name
end

#progressObject

Returns the value of attribute progress.



5
6
7
# File 'lib/work_together/student.rb', line 5

def progress
  @progress
end

Class Method Details

.allObject



13
14
15
# File 'lib/work_together/student.rb', line 13

def self.all
  @@all 
end