On Tue, Nov 29, 2016 at 1:23 AM, Micky Scandal <mickyscandal / gmail.com> wrote:
> ahh, I think that just might work! the method also has a default value for
> if no number is given and that won't account for that, but i can just say:
>   when /^SEEKF (\d+)$/, "SEEKF"
> and maybe add a little logic to only display $1 if it's not equal to 0
> otherwise display 3 (which is the default value).
>
> I'm guessing there might be a way to do that by changing that regexp a
> little bit, but I'm truly horrible with regexp, lol
> thank you very much!

If you do not expect other inputs:

input = gets
input.chomp!

seek = input[/SEEK\s+(\d+)/, 1] and seek_foreward(Integer(seek))

Note, there is a spelling error in your method name. ;-)

Cheers

robert

-- 
[guy, jim, charlie].each {|him| remember.him do |as, often| as.you_can
- without end}
http://blog.rubybestpractices.com/

Unsubscribe: <mailto:ruby-talk-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-talk>