Last active
December 25, 2015 14:36
-
-
Save ngtk/424265b297e5c8f38c4a to your computer and use it in GitHub Desktop.
Pryで日本語リプサムとしてaozoraを使う ref: http://qiita.com/ngtk/items/51ebf0cc7f7b9d498c16
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 'aozora' | |
| Aozora.titles.each do |title| | |
| define_method(title) do |size = 100| | |
| Aozora.public_send(title, size) | |
| end | |
| 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
| Aozora.kokoro #=> "私はその人を常に先生と呼んでいた。だからここでもただ先生と書くだけで本名は打ち明けない。これは世間を憚かる遠慮というよりも、その方が私にとって自然だからである。私はその人の記憶を呼び起すごとに、すぐ「" |
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
| 2.2.3 (main)> kokoro | |
| => "私はその人を常に先生と呼んでいた。だからここでもただ先生と書くだけで本名は打ち明けない。これは世間を憚かる遠慮というよりも、その方が私にとって自然だからである。私はその人の記憶 を呼び起すごとに、すぐ「" | |
| 2.2.3 (main)> kokoro 10 | |
| => "私はその人を常に先生" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment