Sha256: a215afb52ef92cc5423a5c24db2d8e50c8947e2699859b278cc84c8da15ee063
Contents?: true
Size: 747 Bytes
Versions: 36
Compression:
Stored size: 747 Bytes
Contents
module Redcar class Help class ViewController include HtmlController def title "Shortcuts" end def clean_name(command) name = command.to_s.sub("Command","") idx = name.rindex("::") unless idx.nil? name = name[idx+2,name.length] end name = name.split(/(?=[A-Z])/).map{|w| w}.join(" ").sub("R E P L","REPL") end def index rhtml = ERB.new(File.read(File.join(File.dirname(__FILE__), "..", "..", "views", "index.html.erb"))) rhtml.result(binding) end def add_key_binding(key, command) return unless key && key.length > 0 Redcar::KeyBindings.add_key_binding key, command end end end end
Version data entries
36 entries across 36 versions & 2 rubygems