Module: Pokerstats::HandStatisticsAPI::ClassMethods
- Defined in:
- lib/pokerstats/hand_statistics_api.rb
Instance Method Summary collapse
- #rails_generator_command_line_for_player_data ⇒ Object
- #rails_migration_segment_for_player_data ⇒ Object
- #report_specification ⇒ Object
Instance Method Details
#rails_generator_command_line_for_player_data ⇒ Object
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_data ⇒ Object
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_specification ⇒ Object
38 39 40 41 42 |
# File 'lib/pokerstats/hand_statistics_api.rb', line 38 def report_specification [ # [key, sql_type, function] ] end |