Class: BetfairApiNgRails::Api::FormatterFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/betfair_api_ng_rails/api/formatter_factory.rb

Class Method Summary collapse

Class Method Details

.initialize_formatter(name) ⇒ Object



7
8
9
# File 'lib/betfair_api_ng_rails/api/formatter_factory.rb', line 7

def initialize_formatter(name)
  name.is_a?(Symbol) ? initialize_formatter_by(name: name) : name.try(:new)
end