⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 protodoc.rb

📁 Prototype的目标是为开发动态Web程序提供一个容易使用的JS开发框架
💻 RB
字号:
require 'erb'class String  def lines    split $/  end    def strip_whitespace_at_line_ends    lines.map {|line| line.gsub(/\s+$/, '')} * $/  endendmodule Protodoc  module Environment    def include(*filenames)      filenames.map {|filename| Preprocessor.new(filename).to_s}.join("\n")    end  end    class Preprocessor    include Environment        def initialize(filename)      @filename = File.expand_path(filename)      @template = ERB.new(IO.read(@filename), nil, '%')    end        def to_s      @template.result(binding).strip_whitespace_at_line_ends    end  end  endif __FILE__ == $0  print Protodoc::Preprocessor.new(ARGV.first)end

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -