Sha256: 3aa784d6fc6e859caf27b2295fd6acc84aa428f3bc6945f2edd46afd7f444d25
Contents?: true
Size: 268 Bytes
Versions: 19
Compression:
Stored size: 268 Bytes
Contents
module Command def extract_coordinates(command_string) coordinates = [] command_string.scan /-?\d+(\.\d+)?/ do |match_group| coordinates << $&.to_f end coordinates end def extract_command(command_string) command_string[0,1] end end
Version data entries
19 entries across 19 versions & 3 rubygems