Skip to content

Instantly share code, notes, and snippets.

class BankB
def parameters
{
bank_param_1: 0.5,
bank_param_2: 65
}
end
def evaluation_steps
{
class BankA
def parameters
{
bank_param_1: 0.6,
bank_param_2: 60,
}
end
def evaluation_steps
{
module Defaults
module Result1
def self.call(input_a:, input_b:, bank_param_1:, **kwargs)
(input_a + input_b) * bank_param_1
end
end
module Result2
def self.call(result_1:, input_c:, **kwargs)
result_1 / input_c
class PersonValidator < SimpleDelegator
include ActiveModel::Validations
validates :name, presence: true
end
class Validator < ActiveModel::Validator
class Factory
@validators = {}
def self.register(klass, validator)
@rusilko
rusilko / SassMeister-input.scss
Created October 5, 2014 10:18
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
// Mixin approach
@mixin btn
{
min-width: 8rem;
font-family: "League Gothic";
@rusilko
rusilko / gist:3375ebe9eb89dff90c9e
Created September 17, 2014 10:34
Baruco 2014 notes (raw)
Workshop
- try ember when writing a single page app, angular has a shitty router
- lineman.js
Friday:
1. Monorail problem
- propono gem - Pub-Sub architecture
2. Matz
=Navigating=
visit('/projects')
visit(post_comments_path(post))
=Clicking links and buttons=
click_link('id-of-link')
click_link('Link Text')
click_button('Save')
click('Link Text') # Click either a link or a button
click('Button Value')
@rusilko
rusilko / dev_start.sh
Last active April 15, 2017 04:48
Simple bash script to quickly fire up your Rails working environment.
#!/bin/bash
# Function displaying wrong usage information
# Proper usage is: ./dev_start.sh Rails-Project-Folder
usage()
{
cat << EOF
usage: $0 Rails-Project-Folder
EOF
}