Module: Pokerstats::HandStatisticsAPI::ClassMethods

Defined in:
lib/pokerstats/hand_statistics_api.rb

Instance Method Summary collapse

Instance Method Details

#rails_generator_command_line_for_player_dataObject



53
54
55
56
57
# File 'lib/pokerstats/hand_statistics_api.rb', line 53

def rails_generator_command_line_for_player_data
  report_specification.inject("") do |string, each|
    string + "#{each[0]}:#{each[1]} " 
  end
end

#rails_migration_segment_for_player_dataObject



44
45
46
47
48
49
50
51
# File 'lib/pokerstats/hand_statistics_api.rb', line 44

def rails_migration_segment_for_player_data
  prefix = "\n" + " " * 10
  result = "#{prefix}# FROM #{self.to_s}"
  report_specification.each do |each|
    result += "#{prefix}t.#{each[1]}\t#{each[0].inspect}"
  end
  result += "\n"
end

#report_specificationObject



38
39
40
41
42
# File 'lib/pokerstats/hand_statistics_api.rb', line 38

def report_specification
  [
    # [key,   sql_type,   function]
  ]
end