public
Last active

  • Download Gist
ysr23 revised this gist . 1 changed file with 14 additions and 1 deletion. View gist @ be4aa8f
gistfile1.md
15 
... 21 22 23 24                                 ... 21 22 23     24 25 26 27 28 29 30 31 32 33 34 35 36 37  
@@ -21,4 +21,17 @@ yet when i make reply 'by hand':
=> "@twellyme film"
[5] pry(GuideSearch)> p reply.split
["@twellyme", "film"]
- => ["@twellyme", "film"]
\ No newline at end of file
+ => ["@twellyme", "film"]
+
+
+
+ [5] pry(GuideSearch)> p reply
+ "@twellyme film"
+ => "@twellyme film"
+ [6] pry(GuideSearch)> reply = reply.gsub(/[^[:print:]]/, ' ')
+ => "@twellyme film"
+ [8] pry(GuideSearch)> reply.split
+ => ["@twellyme film"]
+ [9] pry(GuideSearch)> p reply.split
+ ["@twellyme film"]
+ => ["@twellyme film"]
\ No newline at end of file
ysr23 revised this gist . 1 changed file with 5 additions and 0 deletions. View gist @ 32570fb
gistfile1.md
5 
...           1 2 3 ... 1 2 3 4 5 6 7 8
@@ -1,3 +1,8 @@
+ def self.process_tweet(reply, requestlink)
+ @requestlink = requestlink
+ qry = reply.downcase.split
+
+
using a breakpoint to inspect 'reply' in my code - but cannot figure out why it is not splitting?
[1] pry(GuideSearch)> p reply
ysr23 revised this gist . 1 changed file with 2 additions and 2 deletions. View gist @ 4199ead
gistfile1.md
4 
... 10 11 12 13   14 15 16 17 18 19       ... 10 11 12   13 14 15 16 17 18     19  
@@ -10,10 +10,10 @@ using a breakpoint to inspect 'reply' in my code - but cannot figure out why it
["@twellyme film"]
=> ["@twellyme film"]
-yet when i make reply 'by hand:
+yet when i make reply 'by hand':
[4] pry(GuideSearch)> reply = "@twellyme film"
=> "@twellyme film"
[5] pry(GuideSearch)> p reply.split
["@twellyme", "film"]
-=> ["@twellyme", "film"]
\ No newline at end of file
+ => ["@twellyme", "film"]
\ No newline at end of file
ysr23 created this gist . View gist @ 1dc7687
gistfile1.md
19 
...                                         ... 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19  
@@ -0,0 +1,19 @@
+using a breakpoint to inspect 'reply' in my code - but cannot figure out why it is not splitting?
+
+ [1] pry(GuideSearch)> p reply
+ "@twellyme film"
+ => "@twellyme film"
+ [2] pry(GuideSearch)> p reply.class
+ String
+ => String
+ [3] pry(GuideSearch)> p reply.split
+ ["@twellyme film"]
+ => ["@twellyme film"]
+
+yet when i make reply 'by hand:
+
+ [4] pry(GuideSearch)> reply = "@twellyme film"
+ => "@twellyme film"
+ [5] pry(GuideSearch)> p reply.split
+ ["@twellyme", "film"]
+=> ["@twellyme", "film"]
\ No newline at end of file
Something went wrong with that request. Please try again.