class ApacheCrunch::CLFIntegerCast
Converts a CLF-formatted string to an integer
“CLF-formatted” means that if the value is 0, the string will be a single hyphen instead of a number. Like %b, for instance.
Public Instance Methods
cast(string_value)
click to toggle source
# File lib/cast.rb, line 14 def cast(string_value) if string_value == "-" return 0 end string_value.to_i end