Legend:
- ✏️ method changes
this. - 🔒 method does not change
this.
Array<T>.prototype.*:
concat(...items: Array): T[]🔒 ES3
| # app/models/my_model.rb | |
| module MyApp | |
| module Model | |
| def self.included(base) | |
| base.send :include, Mongoid::Document | |
| base.send :include, Mongoid::Timestamps | |
| base.send :include, ActiveAdmin::Mongoid::Patches | |
| end | |
| end |
| class Array | |
| def self.toy(n=10, &block) | |
| block_given? ? Array.new(n,&block) : Array.new(n) {|i| i+1} | |
| end | |
| end | |
| class Hash | |
| def self.toy(n=10) | |
| Hash[Array.toy(n).zip(Array.toy(n){|c| (96+(c+1)).chr})] | |
| end |
| set :application, "sprai" | |
| # RVM integration | |
| # http://beginrescueend.com/integration/capistrano/ | |
| $:.unshift(File.expand_path('./lib', ENV['rvm_path'])) | |
| require "rvm/capistrano" | |
| set :rvm_ruby_string, "1.9.2-p290" | |
| set :rvm_type, :user | |
| # Bundler integration (bundle install) |
| require "bundler/capistrano" | |
| server "96.126.100.112", :web, :app, :db, primary: true | |
| set :application, "capteste" | |
| set :user, "deployer" | |
| set :deploy_to, "/home/#{user}/apps/#{application}" | |
| set :deploy_via, :remote_cache | |
| set :use_sudo, false | |
| set :port, "3030" |