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

Version Path
savage-transform-1.3.0 spec/shared/command.rb
text2path-0.0.2 lib/ext/savage/spec/shared/command.rb
text2path-0.0.1 lib/ext/savage/spec/shared/command.rb
savage-1.2.0 spec/shared/command.rb
savage-1.1.8 spec/shared/command.rb
savage-1.1.7 spec/shared/command.rb
savage-1.1.6 spec/shared/command.rb
savage-1.1.5 spec/shared/command.rb
savage-1.1.4 spec/shared/command.rb
savage-1.1.3 spec/shared/command.rb
savage-1.1.2 spec/shared/command.rb
savage-1.1.1 spec/shared/command.rb
savage-1.1.0 spec/shared/command.rb
savage-1.0.3 spec/shared/command.rb
savage-1.0.2 spec/shared/command.rb
savage-1.0.1 spec/shared/command.rb
savage-1.0.0 spec/shared/command.rb
savage-0.2.0 spec/shared/command.rb
savage-0.1.0 spec/shared/command.rb