$ rails -v
Rails 6.0.3.2
$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c)
class Dictionary | |
def self.search_danish(word) | |
new(:da).search(word) | |
end | |
def initialize(language) | |
@language = language | |
end | |
def search(word) |
# frozen_string_literal: true | |
require "bundler/inline" | |
gemfile do | |
source "https://rubygems.org" | |
# gem "activerecord", github: "thomascountz/rails", ref: "5942211feba53c8deec8884bcee109a759c5e60d" | |
gem "activerecord", path: "/worspaces/rails" | |
gem "sqlite3" |
#! /usr/bin/env ruby | |
## Usage: | |
# $ chmod +x ./split_names_prototype.rb | |
# $ ./split_names_prototype.rb | |
## Run Specs | |
# Remove breakpoint: (`binding.pry`) | |
# $ rspec ./split_names_prototype.rb |
# active_record_testbed.rb | |
require 'bundler/inline' | |
gemfile do | |
source 'https://rubygems.org' | |
gem 'activerecord', require: 'active_record' | |
gem 'sqlite3', require: true | |
gem 'pry', require: true | |
end |
#!/usr/bin/env python3 | |
import sys | |
import getopt | |
import serial | |
import time | |
import datetime | |
import csv | |
def main(argv): |
#!/usr/bin/env ruby | |
## USAGE EXAMPLE | |
## $ bin/coloco '{ "key": "value" }' | |
## | |
## $ find ./datastore -type f | xargs tail -n +1 | |
## ==> ./datastore/key <== | |
## value | |
## | |
## ==> ./datastore/index <== |
$ rails -v
Rails 6.0.3.2
$ ruby -v
ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c)
require 'benchmark/ips' | |
Benchmark.ips do |benchmark| | |
benchmark.config(time: 5, warmup: 2) | |
benchmark.report("keyword-args") do | |
def foo(a: nil, b: nil, c: nil, d: nil, e: 1) | |
bar(a: a, b: b, c: c, d: d, e: e) | |
end |