I hereby claim:
- I am cutalion on github.
- I am cutalion (https://keybase.io/cutalion) on keybase.
- I have a public key ASA_TnJvySK6SN95G7RdeuuJi2XAcunV37SabTXa2IwBcAo
To claim this, I am signing this object:
@start = false | |
t1 = Thread.new do | |
while !@start | |
sleep 0.001 | |
end | |
puts 'started 1' | |
end |
class SuperCurry | |
def call(a, b) | |
puts "#{a} + #{b} = #{a + b}" | |
end | |
def curry(*args) | |
arity = method(:call).arity | |
curried_args = args | |
if curried_args.size == arity |
package main | |
import ( | |
"fmt" | |
"github.com/julienschmidt/httprouter" | |
"net/http" | |
"log" | |
"database/sql" | |
_ "github.com/lib/pq" | |
"encoding/json" |
source "https://rubygems.org" | |
gem 'sqlite3' | |
gem 'dry-logic', github: 'dry-rb/dry-logic', branch: 'master' | |
gem 'dry-types', github: 'dry-rb/dry-types', branch: 'master' | |
gem 'rom', github: 'rom-rb/rom', branch: 'master' | |
gem 'rom-sql', github: 'rom-rb/rom-sql', branch: 'master' | |
gem 'pry' |
require 'rom' | |
require 'rom-repository' | |
require 'rom-sql' | |
require 'pry' | |
module Entity | |
end | |
config = ROM::Configuration.new(:sql, 'sqlite::memory') | |
conn = config.gateways[:default].connection |
I hereby claim:
To claim this, I am signing this object:
source "https://rubygems.org" | |
gem 'sqlite3' | |
gem 'dry-logic' | |
gem 'dry-types' | |
gem 'rom' | |
gem 'rom-sql' | |
gem 'pry' |
# Пусть админы могут удалять комментарии | |
# и мы уведомляем кого-нибудь, что комментарий был удален | |
class DeleteComment | |
def call(comment) | |
transaction do | |
comment.delete! | |
user.decrement(:comments_count) | |
end |
module Initializer | |
def initialize | |
puts 'Initializer#initialize' | |
super | |
end | |
end | |
class Klass | |
prepend Initializer |
require 'pry' | |
# A | |
# |- B | |
# | |- D | |
# | | |
# |- C | |
AppError = Class.new(StandardError) | |
Error1 = Class.new(AppError) |