Class: AbstractStudent
- Inherits:
-
Object
- Object
- AbstractStudent
- Defined in:
- lib/source/models/student/student_abstract.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#contact ⇒ Object
readonly
Returns the value of attribute contact.
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
Instance Attribute Details
#contact ⇒ Object (readonly)
Returns the value of attribute contact.
6 7 8 |
# File 'lib/source/models/student/student_abstract.rb', line 6 def contact @contact end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
6 7 8 |
# File 'lib/source/models/student/student_abstract.rb', line 6 def git @git end |
#id ⇒ Object (readonly)
Returns the value of attribute id.
6 7 8 |
# File 'lib/source/models/student/student_abstract.rb', line 6 def id @id end |
Instance Method Details
#get_info ⇒ Object
10 11 12 |
# File 'lib/source/models/student/student_abstract.rb', line 10 def get_info "#{get_fio};#{get_contact};#{get_git}" end |
#to_s ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/source/models/student/student_abstract.rb', line 14 def to_s vars = {} instance_variables.map do |attribute| vars[attribute.to_s[1..]] = instance_variable_get(attribute) end JSON(vars) end |