Sha256: 7afa4274c8d5a8a358d50a3e8aeacf275987f5b143849337563b406587befde9
Contents?: true
Size: 1.12 KB
Versions: 10
Compression:
Stored size: 1.12 KB
Contents
module IEX module Resources module Chart class Base < Resource property 'high' property 'low' property 'volume' property 'open' property 'close' property 'label' property 'date', transform_with: ->(v) { Date.parse(v) } end class Default < Base property 'u_high', from: 'uHigh' property 'u_low', from: 'uLow' property 'u_volume', from: 'uVolume' property 'u_open', from: 'uOpen' property 'u_close', from: 'uClose' property 'change' property 'change_percent', from: 'changePercent' property 'change_percent_s', from: 'changePercent', with: lambda { |v| [ v.positive? ? '+' : '', format('%.2f', v), '%' ].join } # change in percent as a String with a leading + or - sign property 'change_over_time', from: 'changeOverTime' end class OneDay < Base property 'minute' property 'average' property 'notional' property 'number_of_trades', from: 'numberOfTrades' end end end end
Version data entries
10 entries across 10 versions & 1 rubygems