$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew update && brew upgrade
This file contains hidden or 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
$npcs = {} | |
def say(words) | |
puts words | |
end | |
def npc(name, &block) | |
$npcs[name] = block | |
end |
This file contains hidden or 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
def application(name, &block) | |
$app = Application.new | |
$app.name = name | |
$app.instance_eval(&block) | |
end | |
class Application | |
attr_accessor :name | |
def initialize |
This file contains hidden or 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 "csv" | |
class Lottery | |
def initialize | |
filename = File.expand_path(File.dirname(__FILE__) + '/data.csv') | |
@names = CSV.read(filename)[1..-1].map{|row| row[0]} | |
end | |
def random | |
@names[rand(@names.size)] |
$ brew install sqlite3
woowahan-api-demo
-> https://github.com/ahastudio/woowahan-api-demo
https://github.com/guard/guard
몇 가지 규칙에 따라 자동으로 뭔가를 해주는 프로그램.
일단 브랜치를 하나 만들고 작업 시작.
MySQL 세팅과 동일하다.
$ vi Gemfile