Module: Niconico::Helper
Instance Method Summary collapse
Instance Method Details
#escape_string(str) ⇒ Object
8 9 10 |
# File 'lib/nv/niconico/helper.rb', line 8 def escape_string(str) str.gsub(/[\/\\?*:|><]/) {|m| [m.ord + 65248].pack('U*')} end |
#mylist?(url) ⇒ Boolean
3 4 5 6 |
# File 'lib/nv/niconico/helper.rb', line 3 def mylist?(url) return true if url =~ /mylist\/\d+/ false end |