Class: Super_Student
- Inherits:
-
Object
- Object
- Super_Student
- Defined in:
- lib/files/Super_Student.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#Father_name ⇒ Object
Returns the value of attribute Father_name.
-
#Git ⇒ Object
Returns the value of attribute Git.
-
#ID ⇒ Object
Returns the value of attribute ID.
-
#Name ⇒ Object
Returns the value of attribute Name.
-
#Surname ⇒ Object
Returns the value of attribute Surname.
Class Method Summary collapse
- .acc_valid?(account) ⇒ Boolean
- .id_valid?(id) ⇒ Boolean
- .name_valid?(name) ⇒ Boolean
- .parse_str(str) ⇒ Object
Instance Method Summary collapse
- #contact ⇒ Object
- #getInfo ⇒ Object
-
#initialize(name, surname, father_name, id, git) ⇒ Super_Student
constructor
A new instance of Super_Student.
- #short_name ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(name, surname, father_name, id, git) ⇒ Super_Student
Returns a new instance of Super_Student.
5 6 7 8 9 10 11 |
# File 'lib/files/Super_Student.rb', line 5 def initialize(name, surname, father_name, id, git) self.Name = name self.Surname = surname self.Father_name = father_name self.ID = id self.Git = git end |
Instance Attribute Details
#Father_name ⇒ Object
Returns the value of attribute Father_name.
3 4 5 |
# File 'lib/files/Super_Student.rb', line 3 def Father_name @Father_name end |
#Git ⇒ Object
Returns the value of attribute Git.
3 4 5 |
# File 'lib/files/Super_Student.rb', line 3 def Git @Git end |
#ID ⇒ Object
Returns the value of attribute ID.
3 4 5 |
# File 'lib/files/Super_Student.rb', line 3 def ID @ID end |
#Name ⇒ Object
Returns the value of attribute Name.
3 4 5 |
# File 'lib/files/Super_Student.rb', line 3 def Name @Name end |
#Surname ⇒ Object
Returns the value of attribute Surname.
3 4 5 |
# File 'lib/files/Super_Student.rb', line 3 def Surname @Surname end |
Class Method Details
.acc_valid?(account) ⇒ Boolean
40 41 42 |
# File 'lib/files/Super_Student.rb', line 40 def self.acc_valid?(account) account.match(/^@[\w\d\-_]+$/) end |
.id_valid?(id) ⇒ Boolean
13 14 15 |
# File 'lib/files/Super_Student.rb', line 13 def self.id_valid?(id) String(id).match(/^\d+$/) end |
.name_valid?(name) ⇒ Boolean
21 22 23 |
# File 'lib/files/Super_Student.rb', line 21 def self.name_valid?(name) name.match(/^[А-Я][^А-Я\d]+$/) end |
.parse_str(str) ⇒ Object
53 54 |
# File 'lib/files/Super_Student.rb', line 53 def self.parse_str(str) end |
Instance Method Details
#contact ⇒ Object
59 60 |
# File 'lib/files/Super_Student.rb', line 59 def contact end |
#getInfo ⇒ Object
56 57 |
# File 'lib/files/Super_Student.rb', line 56 def getInfo end |
#short_name ⇒ Object
49 50 51 |
# File 'lib/files/Super_Student.rb', line 49 def short_name "#{Surname} #{Name.upcase[0]}. #{Father_name.upcase[0]}" end |
#to_s ⇒ Object
62 63 |
# File 'lib/files/Super_Student.rb', line 62 def to_s end |