Sha256: 4bff3eb25c931da0700ce2a1a037cd144b4def1ab5a2eb0b939990b5db9e9b12
Contents?: true
Size: 338 Bytes
Versions: 7
Compression:
Stored size: 338 Bytes
Contents
module MWO::Utils def fetch(url) response = open(url) body = JSON.parse(response.read) end def to_symbol(string) word = string.dup word.gsub!(/::/, '/') word.gsub!(/([A-Z]+)([A-Z][a-z])/, '\1_\2') word.gsub!(/([a-z\d])([A-Z])/, '\1_\2') word.tr!('-', '_') word.downcase! word.to_sym end end
Version data entries
7 entries across 7 versions & 1 rubygems