Class | BackspaceController |
In: |
app/controllers/backspace_controller.rb
|
Parent: | ApplicationController |
EndPart | = | -15..-1 |
# File app/controllers/backspace_controller.rb, line 26 26: def extras 27: @text=session[:text] 28: end
# File app/controllers/backspace_controller.rb, line 12 12: def get_choices 13: t=get_text 14: bsprx=[/.$/, /..$/, #last char(s) 15: /\w+\W*$/, #last word 16: /[.?!;][\w ,]+$/, #last sentence 17: /.*/] #all 18: c=[] #choices 19: bsprx.each do |r| 20: if t=~r 21: c<< $~.pre_match+ '<del>'+$~.to_s+'</del>' 22: end 23: end 24: c.uniq 25: end
# File app/controllers/backspace_controller.rb, line 6 6: def get_title 7: 'delete: how much?' 8: end
# File app/controllers/backspace_controller.rb, line 3 3: def reformat_choices 4: # @choices=get_choices.collect {|s| s[EndPart]} 5: end