class FootballCli::Format::FormatFactory
Public Class Methods
build(format, *args)
click to toggle source
# File lib/football_cli/format/format_factory.rb, line 8 def self.build(format, *args) case format when 'table' then Table.new(*args) when 'json' then Json.new(*args) when 'csv' then Csv.new(*args) else raise 'Invalid format type. Available options (table, json, csv)' end end