Class: Reccore::EC
- Inherits:
-
Object
- Object
- Reccore::EC
- Defined in:
- lib/reccore.rb
Overview
:volume => element.css(‘buy/volume’).text, :avg => element.css(‘buy/avg’).text, :max => element.css(‘buy/max’).text, :min => element.css(‘buy/min’).text, :stddev => element.css(‘buy/stddev’).text, :median => element.css(‘buy/median’).text, :percentile => element.css(‘buy/percentile’).text
Instance Method Summary collapse
- #get_buy_avg(typeid) ⇒ Object
- #get_buy_max(typeid) ⇒ Object
- #get_buy_median(typeid) ⇒ Object
- #get_buy_min(typeid) ⇒ Object
- #get_buy_percentile(typeid) ⇒ Object
- #get_buy_stddev(typeid) ⇒ Object
- #get_buy_volume(typeid) ⇒ Object
- #get_sell_avg(typeid) ⇒ Object
- #get_sell_max(typeid) ⇒ Object
- #get_sell_median(typeid) ⇒ Object
- #get_sell_min(typeid) ⇒ Object
- #get_sell_percentile(typeid) ⇒ Object
- #get_sell_stddev(typeid) ⇒ Object
- #get_sell_volume(typeid) ⇒ Object
Instance Method Details
#get_buy_avg(typeid) ⇒ Object
30 31 32 33 34 35 36 37 |
# File 'lib/reccore.rb', line 30 def get_buy_avg(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].first[:buy][:avg] else Reccore.cache[typeid.to_s].first[:buy][:avg] end end |
#get_buy_max(typeid) ⇒ Object
39 40 41 42 43 44 45 46 |
# File 'lib/reccore.rb', line 39 def get_buy_max(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].first[:buy][:max] else Reccore.cache[typeid.to_s].first[:buy][:max] end end |
#get_buy_median(typeid) ⇒ Object
66 67 68 69 70 71 72 73 |
# File 'lib/reccore.rb', line 66 def get_buy_median(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].first[:buy][:median] else Reccore.cache[typeid.to_s].first[:buy][:median] end end |
#get_buy_min(typeid) ⇒ Object
48 49 50 51 52 53 54 55 |
# File 'lib/reccore.rb', line 48 def get_buy_min(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].first[:buy][:min] else Reccore.cache[typeid.to_s].first[:buy][:min] end end |
#get_buy_percentile(typeid) ⇒ Object
75 76 77 78 79 80 81 82 |
# File 'lib/reccore.rb', line 75 def get_buy_percentile(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].first[:buy][:percentile] else Reccore.cache[typeid.to_s].first[:buy][:percentile] end end |
#get_buy_stddev(typeid) ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/reccore.rb', line 57 def get_buy_stddev(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].first[:buy][:stddev] else Reccore.cache[typeid.to_s].first[:buy][:stddev] end end |
#get_buy_volume(typeid) ⇒ Object
21 22 23 24 25 26 27 28 |
# File 'lib/reccore.rb', line 21 def get_buy_volume(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].first[:buy][:volume] else Reccore.cache[typeid.to_s].first[:buy][:volume] end end |
#get_sell_avg(typeid) ⇒ Object
93 94 95 96 97 98 99 100 |
# File 'lib/reccore.rb', line 93 def get_sell_avg(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].last[:sell][:avg] else Reccore.cache[typeid.to_s].last[:sell][:avg] end end |
#get_sell_max(typeid) ⇒ Object
102 103 104 105 106 107 108 109 |
# File 'lib/reccore.rb', line 102 def get_sell_max(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].last[:sell][:max] else Reccore.cache[typeid.to_s].last[:sell][:max] end end |
#get_sell_median(typeid) ⇒ Object
129 130 131 132 133 134 135 136 |
# File 'lib/reccore.rb', line 129 def get_sell_median(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].last[:sell][:median] else Reccore.cache[typeid.to_s].last[:sell][:median] end end |
#get_sell_min(typeid) ⇒ Object
111 112 113 114 115 116 117 118 |
# File 'lib/reccore.rb', line 111 def get_sell_min(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].last[:sell][:min] else Reccore.cache[typeid.to_s].last[:sell][:min] end end |
#get_sell_percentile(typeid) ⇒ Object
138 139 140 141 142 143 144 145 |
# File 'lib/reccore.rb', line 138 def get_sell_percentile(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].last[:sell][:percentile] else Reccore.cache[typeid.to_s].last[:sell][:percentile] end end |
#get_sell_stddev(typeid) ⇒ Object
120 121 122 123 124 125 126 127 |
# File 'lib/reccore.rb', line 120 def get_sell_stddev(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].last[:sell][:stddev] else Reccore.cache[typeid.to_s].last[:sell][:stddev] end end |
#get_sell_volume(typeid) ⇒ Object
84 85 86 87 88 89 90 91 |
# File 'lib/reccore.rb', line 84 def get_sell_volume(typeid) if Reccore.cache[typeid.to_s].nil? Reccore::Marketstat.new(:typeid => typeid.to_s) Reccore.cache[typeid.to_s].last[:sell][:volume] else Reccore.cache[typeid.to_s].last[:sell][:volume] end end |