class FTLTools::Crew
Storage for each member of the crew
Attributes
roster[R]
Public Class Methods
new()
click to toggle source
# File lib/ftl_tools/crew.rb, line 11 def initialize @roster = Hash.new end
Public Instance Methods
add(data)
click to toggle source
# File lib/ftl_tools/crew.rb, line 15 def add(data) if data[:team] add_team(data) unless @roster[data[:team]] @roster[data[:team]] << data[:person] else @roster[data[:role]] = data[:person] end end
add_team(data)
click to toggle source
# File lib/ftl_tools/crew.rb, line 24 def add_team(data) @roster[data[:team]] = Array.new end