all? { |${e}| ${cursor} }alias_method :${new_name}, :${old_name}any? { |${e}| ${cursor} }if __FILE__ == $$PROGRAM_NAME
${cursor}
endArray.new(${10}) { |${i}|${cursor} }assert_redirected_to :action => "${index}"assert(${test}, "${message}")assert(${var} = assigns(:${var}), "@${var} should be defined")assert_equal(${expected}, ${actual})assert_in_delta(${expected_float}, ${actual_float}, ${20})assert_instance_of(${ExpectedClass}, ${actual_instance})assert_kind_of(${ExpectedKind}, ${actual_instance})assert_match(/${expected_pattern}/, ${actual_string})assert_nil(${instance})assert_not_equal(${unexpected}, ${actual})assert_no_match(/${unexpected_pattern}/, ${actual_string})assert_not_nil(${instance})assert_not_nil(${var} = assigns(:${var}))assert_nothing_raised(${Exception}) { ${cursor} }assert_not_same(${unexpected}, ${actual})assert_nothing_thrown { ${cursor} }assert_operator(${left}, :${operator}, ${right})assert_raise(${Exception}) { ${cursor} }assert_redirected_to(${path}, '${message}')assert_response :${success}assert_respond_to(${object}, :${method})assert_same(${expected}, ${actual})assert_send([${object}, :${message}, ${args}])assert_throws(:${expected}) { ${cursor} }=begin rdoc
${cursor}
=endbegin
${paste}
rescue ${Exception} => ${e}
${cursor}
end
TESTS = ${10_000}
Benchmark.bmbm(${10}) do |results|
${cursor}
endbelongs_to :${object}belongs_to :${object}, :class_name => '${class_name}', :foreign_key => :${foreign_key}case ${object}
when ${condition}
${cursor}
endclassify { |${e}| ${cursor} }class ${ClassName} < DelegateClass(${ParentClass})
def initialize${1}
super(${del_obj})
${cursor}
end
endclass ${ClassName} < ${ParentClass}
def initialize${1}
${cursor}
end
endclass ${ClassName} < Struct.new(:${attr_names})
def initialize(*args)
super
${cursor}
end
endclass ${ClassName}
${cursor}
endclass ${ClassName}
def initialize${1}
${cursor}
end
endclass << ${self}
${cursor}
endclass ${BlankSlate}
instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ }
def initialize${var}
@${delegate} = ${delegate_object}
${cursor}
end
def method_missing(meth, *args, &block)
@${delegate}.send(meth, *args, &block)
end
endsplit("::").inject(Object) { |par, const| par.const_get(const) }class ${ClassName}
${cursor}
endcollect { |${e}| ${cursor} }collect { |${element}| ${element}.${cursor} }include Comparable
def <=>(other)
${cursor}
endMarshal.load(Marshal.dump(${obj_to_copy}))def ${method_name}
${cursor}
enddef_delegator :${del_obj}, :${del_meth}, :${new_name}def_delegators :${del_obj}, :${del_methods}def ${method_name}
${cursor}
enddef self.${class_method_name}
${cursor}
enddef test_${case_name}
${cursor}
enddelete_if { |${e}| ${cursor} }detect { |${e}| ${cursor} }Dir.glob(${glob}) { |${file}| ${cursor} }do
${cursor}
enddo |${object}|
${cursor}
enddownto(${0}) { |${n}|${cursor} }each { |${e}| ${cursor} }each_byte { |${byte}| ${cursor} }each_char { |${chr}| ${cursor} }each_cons(${2}) { |${group}| ${cursor} }each { |${element}| ${element}.${cursor} }each_with_index { |${element}, ${idx}| ${element}.${cursor} }each_index { |${i}| ${cursor} }each_key { |${key}| ${cursor} }each_line${1} { |${line}| ${cursor} }each_pair { |${name}, ${val}| ${cursor} }each_slice(${2}) { |${group}| ${cursor} }each_value { |${val}| ${cursor} }each_with_index { |${e}, ${i}| ${cursor} }elsif ${condition}
${cursor}include Enumerable
def each(&block)
${cursor}
endfetch(${name}) { |${key}|${cursor} }fill(${range}) { |${i}|${cursor} }File.foreach(${file}) { |${line}| ${cursor} }find { |${e}| ${cursor} }find_all { |${e}| ${cursor} }flunk("${message}")inject(Array.new) { |${arr}, ${a}| ${arr}.push(*${a}) }flash[:${notice}] = "${Successfully}"${cursor}for ${element} in ${collection}
${element}.${cursor}
endextend Forwardablegrep(${pattern}) { |${match}| ${cursor} }gsub(/${pattern}/) { |${match}|${cursor} }has_and_belongs_to_many :${object}Hash.new { |${hash}, ${key}| ${hash}[${key}] = ${cursor} }has_many :${models}has_many :${models}, :class_name => '${class_name}', :foreign_key => :${foreign_key}has_many :${models}, :through => :${join_models}has_one :${model}has_one :${model}, :class_name => '${class_name}', :foreign_key => :${foreign_key}:${key} => ${value}if ${condition}
${cursor}
endif ${condition}
${2}
else
${3}
endinject(${init}) { |${mem}, ${var}| ${cursor} }inject(${object}) { |${injection}, ${element}| ${4} }${cursor}lambda { |${args}|${cursor} }logger.debug "${message}"${cursor}logger.error "${message}"${cursor}logger.fatal "${message}"${cursor}logger.info "${message}"${cursor}logger.warn "${message}"${cursor}add_column :${table}, :${column}, :${string}map { |${e}| ${cursor} }enum_with_index.map { |${e}, ${i}| ${cursor} }max { |a, b| ${cursor} }t.column :${title}, :${string}${cursor}t.column :${title}, :${string}
mccc${cursor}create_table :${table} do |t|
${cursor}
endFile.open(${dump}, "w") { |${file}| Marshal.dump(${obj}, ${file}) }drop_table :${table}
${cursor}min { |a, b| ${cursor} }File.open(${dump}) { |${file}| Marshal.load(${file}) }def method_missing(meth, *args, &block)
${cursor}
endrename_column :${column}, :${new_column}rename_table :${table}, :${new_name}${cursor}module ${ModuleName}
module ClassMethods
${cursor}
end
extend ClassMethods
def self.included(receiver)
receiver.extend(ClassMethods)
end
endmodule ${ModuleName}
${cursor}
endmodule ${ModuleName}
module_function
${cursor}
endremove_column :${table}, :${column}open(${pipe}) { |${io}| ${cursor} }opts.on( "-${o}", "--${option}"${1},
"${description}" ) do |${opt}|
${cursor}
endrequire "optparse"
require "ostruct"
options = OpenStruct.new(${default})
ARGV.options do |opts|
opts.banner = "Usage: #{File.basename($$PROGRAM_NAME)} [OPTIONS]${1}"
opts.separator ""
opts.separator "Specific Options:"
${cursor}
opts.separator "Common Options:"
opts.on( "-h", "--help",
"Show this message." ) do
puts opts
exit
end
begin
opts.parse!
rescue
puts opts
exit
end
end
partition { |${e}| ${cursor} }params[:${id}]File.join(File.dirname(__FILE__), *%w[${here}])PStore.new(${file_name})render :action => "${action}"render :action => "${action}", :layout => "${layoutname}"sort_by { rand }#!/usr/bin/env ruby -w
render_component :action => "${index}"render_component :controller => "${items}"render_component :controller => "${items}", :action => "${index}"RAILS_DEFAULT_LOGGER.debug "${message}"${cursor}redirect_to :action => "${index}"redirect_to :action => "${show}", :id => ${item}redirect_to :controller => "${items}"redirect_to :controller => "${items}", :action => "${list}"redirect_to :controller => "${items}", :action => "${show}", :id => ${item}reject { |${e}| ${cursor} }reject { |${element}| ${element}.${cursor} }results.report("${name}:") { TESTS.times { ${cursor} } }require "${cursor}"reverse_each { |${e}| ${cursor} }render(:file => "${filepath}")render(:file => "${filepath}", :use_full_path => ${false})render(:inline => "${hello}")render(:inline => "${hello}", :locals => { ${name} => "${value}"${4} })render(:inline => "${hello}", :type => ${rxml})render(:layout => "${layoutname}")render(:nothing => ${true})render(:nothing => ${true}, :status => ${401})attr_reader :${attr_names}render(:partial => "${item}")render(:partial => "${item}", :collection => ${items})render(:partial => "${item}", :locals => { :${name} => ${value} })render(:partial => "${item}", :object => ${object})render(:partial => "${item}", :status => ${500})render(:text => "${render}")render(:text => "${render}", :layout => "${layoutname}")render(:text => "${render}", :layout => ${true})render(:text => "${render}", :status => ${401})attr_accessor :${attr_names}scan(/${pattern}/) { |${match}| ${cursor} }select { |${e}| ${cursor} }select { |${element}| ${element}.${2} }${cursor}session[:${User}]class << self; self endsort { |a, b| ${cursor} }sort_by { |${e}| ${cursor} }step(${2}) { |${n}|${cursor} }sub(/${pattern}/) { |${match}|${cursor} }require "test/unit"
require "${library_file_name}"
class Test${amp} < Test::Unit::TestCase
def test_${case_name}
${cursor}
end
endtimes { |${n}|${cursor} }transaction${1} { ${cursor} }require "test/unit"
require "tc_${test_case_file}"
require "tc_${test_case_file}"
ARGF.each_line${1} do |${line}|
${cursor}
endunless ${condition}
${cursor}
enduntil ${condition}
${cursor}
endupto(${0}) { |${n}|${cursor} }if ARGV.${1}
puts "Usage: #{$$PROGRAM_NAME} ${ARGS_GO_HERE}"
exit
endunless ARGV.${1}
puts "Usage: #{$$PROGRAM_NAME} ${ARGS_GO_HERE}"
exit
endvalidates_associated :${attribute}validates_confirmation_of :${attribute}validates_exclusion_of :${attribute}verify :only => [:${1}], :session => :user, :params => :id, :redirect_to => {:action => '${index}'}
verify :only => [:${1}], :method => :post, :render => {:status => 500, :text => "use HTTP-POST"}
validates_length_of :${attribute}, :within => ${20}validates_presence_of :${attribute}validates_presence_of :${attribute}, :if => proc { |obj| ${condition} }}validates_uniqueness_of :${attribute}when ${condition}
${cursor}while ${condition}
${cursor}
endattr_writer :${attr_names}File.open(${yaml}, "w") { |${file}| YAML.dump(${obj}, ${file}) } :yields: ${arguments}File.open(${yaml}) { |${file}| YAML.load(${file}) }zip(${enums}) { |${row}| ${cursor} }