Class ScrollController
In: app/controllers/scroll_controller.rb
Parent: ApplicationController

Methods

Public Instance methods

[Source]

    # File app/controllers/scroll_controller.rb, line 36
36:         def extras
37:                 @text=get_text
38:                 @overflow=get_overflow
39:         end

[Source]

    # File app/controllers/scroll_controller.rb, line 13
13:   def get_choices
14:                 t=get_text
15:                 b=get_overflow
16:                 shiftrx=[/./, /../, #first char(s)
17:                         /^\W*\w+/, #first word
18:                         /.*[.?!;]/, #first sentence
19:                         /.*\n/] #first para
20: 
21:                 c=[] #choices
22:                 shiftrx.each do |r|
23:                         if b=~r
24:                                 c<< t+ $~.to_s+ '||' + $~.post_match
25:                         end
26:                 end
27:                 c.uniq
28:   end

[Source]

    # File app/controllers/scroll_controller.rb, line 10
10:         def get_separator
11:                 '`'
12:         end

def first_time

        session[:separator]='`'
        session[:choices]=nil
  redirect_to :action => "index"

end

[Source]

   # File app/controllers/scroll_controller.rb, line 7
7:         def get_title
8:                 'scroll text up'
9:         end

[Source]

    # File app/controllers/scroll_controller.rb, line 29
29:         def reformat_choices
30:         end

[Source]

    # File app/controllers/scroll_controller.rb, line 31
31:         def selected(str)
32:                 session[:text],session[:overflow]=
33:                         str.split('||')
34:                 session[:choices]=nil
35:         end

[Validate]