Module: Mspire::Mascot::Dat::Cast

Defined in:
lib/mspire/mascot/dat/cast.rb

Constant Summary collapse

TO_INT_ARRAY =
->(val) { val.split(',').map(&:to_i) }
FROM_CHARGE_STRING =
->(st) { (st[-1] << st[0...-1]).to_i }
CGI_UNESCAPE =
->(st) { CGI.unescape(st) }
FLOAT_PAIRS =
->(st) { st.split(',').map {|pair_s| pair_s.split(':').map(&:to_f) } }