See the Official Guides.
Start a REPL: iex
See the Official Guides.
Start a REPL: iex
| ApplicationRecord.connection.execute( | |
| <<~SQL | |
| CREATE TEMPORARY TABLE IF NOT EXISTS gadgets | |
| ( | |
| id bigint NOT NULL, | |
| name varchar(64) NOT NULL | |
| ); | |
| CREATE TEMPORARY SEQUENCE IF NOT EXISTS gadgets_id_seq | |
| START WITH 1 |
| $LOAD_PATH.unshift './lib' | |
| source_file = ARGV[0] | |
| target_file = ARGV[1] | |
| puts "Source: #{source_file}" | |
| puts "Target: #{target_file}" | |
| require 'fileutils' |
| class CommandParser | |
| class OptionsParser | |
| def initialize | |
| @parsed = nil | |
| @buffer = nil | |
| @bname = nil | |
| end # constructor | |
| def parse tokens | |
| self.buffer = '' |
| module Spec::Support | |
| class ExampleGroup | |
| class << self | |
| attr_reader :description | |
| def describe description | |
| example_group = Class.new(self) | |
| example_group.description = description |
| alias git-list-branches="git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'" |
| class Comparator | |
| def initialize(actual, expected) | |
| @actual = actual | |
| @expected = expected | |
| @errors = Hash.new { |hsh, key| hsh[key] = [] } | |
| end # constructor | |
| attr_accessor :actual, :expected, :errors | |
| def eql? |
| # Implements module-based inheritance of both class- and instance-level | |
| # methods. | |
| module Mixin | |
| def mixins | |
| @mixins ||= [] | |
| end # accessor mixins | |
| def mixins=(ary) | |
| @mixins = ary |
| export PATH="/Applications/Sublime Text.app/Contents/SharedSupport/bin:$PATH" | |
| export PGDATA="/usr/local/var/postgres" | |
| eval "$(rbenv init - zsh)" | |
| alias ci="bundle exec rspec && bundle exec rubocop" | |
| alias be="bundle exec" | |
| alias bea="bundle exec appraisal" | |
| alias loki="bundle exec thor" | |
| alias osd="OVERMIND_PROCFILE=Procfile.dev overmind start" |
cribbed from http://pastebin.com/xgzeAmBn
Templates to remind you of the options and formatting for the different types of objects you might want to document using YARD.