class ROdds::Odd::Standardizer
Attributes
odd_format[R]
raw_odd[R]
Public Class Methods
call(params)
click to toggle source
# File lib/r_odds/standardizer.rb, line 5 def self.call(params) new(params).call end
new(params)
click to toggle source
# File lib/r_odds/standardizer.rb, line 9 def initialize(params) @raw_odd = params[:odd] @odd_format = params[:format] || ROdds::InferOddFormat.of(odd: raw_odd) end
Public Instance Methods
call()
click to toggle source
# File lib/r_odds/standardizer.rb, line 14 def call standardizer_class = ROdds::OddStandardizer::ClassFactory.for(format: odd_format) standardizer_class.call(odd: raw_odd) end