Class: Sports::Player
- Inherits:
-
Object
- Object
- Sports::Player
- Defined in:
- lib/sportdb/structs.rb
Overview
Club(Squad)Player and such in use
Instance Attribute Summary collapse
-
#alt_names ⇒ Object
Returns the value of attribute alt_names.
-
#birthdate ⇒ Object
readonly
Returns the value of attribute birthdate.
-
#birthplace ⇒ Object
readonly
Returns the value of attribute birthplace.
-
#height ⇒ Object
readonly
Returns the value of attribute height.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#nat ⇒ Object
readonly
Returns the value of attribute nat.
-
#pos ⇒ Object
readonly
Returns the value of attribute pos.
Instance Method Summary collapse
-
#initialize(name:, pos: nil, nat: nil, height: nil, birthdate: nil, birthplace: nil) ⇒ Player
constructor
A new instance of Player.
Constructor Details
#initialize(name:, pos: nil, nat: nil, height: nil, birthdate: nil, birthplace: nil) ⇒ Player
Returns a new instance of Player.
50 51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/sportdb/structs.rb', line 50 def initialize( name:, pos: nil, nat: nil, height: nil, birthdate: nil, birthplace: nil ) @name = name @alt_names = [] @pos = pos @nat = nat @height = height @birthdate = birthdate @birthplace = birthplace end |
Instance Attribute Details
#alt_names ⇒ Object
Returns the value of attribute alt_names.
48 49 50 |
# File 'lib/sportdb/structs.rb', line 48 def alt_names @alt_names end |
#birthdate ⇒ Object (readonly)
Returns the value of attribute birthdate.
41 42 43 |
# File 'lib/sportdb/structs.rb', line 41 def birthdate @birthdate end |
#birthplace ⇒ Object (readonly)
Returns the value of attribute birthplace.
41 42 43 |
# File 'lib/sportdb/structs.rb', line 41 def birthplace @birthplace end |
#height ⇒ Object (readonly)
Returns the value of attribute height.
41 42 43 |
# File 'lib/sportdb/structs.rb', line 41 def height @height end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
41 42 43 |
# File 'lib/sportdb/structs.rb', line 41 def name @name end |
#nat ⇒ Object (readonly)
Returns the value of attribute nat.
41 42 43 |
# File 'lib/sportdb/structs.rb', line 41 def nat @nat end |
#pos ⇒ Object (readonly)
Returns the value of attribute pos.
41 42 43 |
# File 'lib/sportdb/structs.rb', line 41 def pos @pos end |