これくらいの実例とともにソリューション選択できるようにしていきたい。
著者: 青い鴉(ぶるくろ)さん @bluecrow2
これは結城浩さんの運用されていた YukiWiki に当時 Coffee 様 (青い鴉(ぶるくろ)さん)がかかれていた文章です。 ただ 2018 年 3 月 7 日に YukiWiki が運用停止したため消えてしまいました。その記事のバックアップです。
今は 404 ですが、もともとの記事の URL は http://www.hyuki.com/yukiwiki/wiki.cgi?%A5%C7%A5%B9%A5%DE%A1%BC%A5%C1%A4%AC%B5%AF%A4%AD%A4%EB%CD%FD%CD%B3 になります。
昔、自分がとても感銘を受けた文章なので、このまま読めなくなるのはとてももったいないと思い、バックアップとして公開しています。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "rom-repository" | |
require "rom-sql" | |
config = ROM::Configuration.new(:sql, 'postgres://localhost/rom_repository') | |
class Users < ROM::Relation[:sql] | |
def by_id(id) | |
where(id: id) | |
end | |
end |
新社会人に必須である:
- 勤務先との書面による「労働契約」。業務委託契約等NG。
- 多寡を問わず毎月払われる給料。遅配等論外である。
- 健康保険。
- 労災保険。
- 雇用保険。
- 三六協定。
- 年次有休。
- 育児休業の制度があり取得者がいる会社に勤務する。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# rubocop v0.35.0 から inherit_gem という機能が増えたので gem にしました | |
# https://github.com/onk/onkcop | |
inherit_gem: | |
onkcop: "config/rubocop.yml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
class KaraokeMachine | |
def initialize(melody) | |
end | |
def transpose(amount) | |
"" # これは仮実装なので消してください | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Original Rails controller and action | |
class EmployeesController < ApplicationController | |
def create | |
@employee = Employee.new(employee_params) | |
if @employee.save | |
redirect_to @employee, notice: "Employee #{@employee.name} created" | |
else | |
render :new | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'rake' | |
gem 'lotus-router' | |
gem 'lotus-controller' | |
gem 'lotus-view' | |
group :test do | |
gem 'rspec' | |
gem 'capybara' |
更新: | 2014-11-20 |
---|---|
バージョン: | 0.0.5 |
作者: | @voluntas |
URL: | http://voluntas.github.io/ |
概要
NewerOlder