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
| # -*- coding: utf-8 -*- | |
| # CSA形式の棋譜を表すクラス | |
| class CsaRecord | |
| Sente = true | |
| Gote = false | |
| attr_accessor :file | |
| def initialize( *args ) | |
| option = args.pop | |
| case option |
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 'oauth' | |
| require 'json' | |
| require 'cgi' | |
| class Tumblr4r | |
| def initialize(access_token) | |
| @access_token = access_token | |
| end | |
| def api_key |
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
| # -*- coding: utf-8 -*- | |
| require "tempfile" | |
| desc "scaffoldで生成されたコントローラーからrespond_toブロックを消す" | |
| namespace :my do | |
| task :rm_respond_to do | |
| Dir::glob("app/controllers/*_*.rb") do |ctrl| | |
| if !(File::basename(ctrl) =~ /application/) | |
| temp = Tempfile::new("tmp",Dir::pwd) | |
| open(ctrl) do |f| | |
| text = f.read |
NewerOlder