Class: Sports::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/sportdb/structs.rb

Overview

Club(Squad)Player and such in use

Instance Attribute Summary collapse

Instance Method Summary collapse

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_namesObject

Returns the value of attribute alt_names.



48
49
50
# File 'lib/sportdb/structs.rb', line 48

def alt_names
  @alt_names
end

#birthdateObject (readonly)

Returns the value of attribute birthdate.



41
42
43
# File 'lib/sportdb/structs.rb', line 41

def birthdate
  @birthdate
end

#birthplaceObject (readonly)

Returns the value of attribute birthplace.



41
42
43
# File 'lib/sportdb/structs.rb', line 41

def birthplace
  @birthplace
end

#heightObject (readonly)

Returns the value of attribute height.



41
42
43
# File 'lib/sportdb/structs.rb', line 41

def height
  @height
end

#nameObject (readonly)

Returns the value of attribute name.



41
42
43
# File 'lib/sportdb/structs.rb', line 41

def name
  @name
end

#natObject (readonly)

Returns the value of attribute nat.



41
42
43
# File 'lib/sportdb/structs.rb', line 41

def nat
  @nat
end

#posObject (readonly)

Returns the value of attribute pos.



41
42
43
# File 'lib/sportdb/structs.rb', line 41

def pos
  @pos
end