Last active
April 30, 2019 16:16
-
-
Save pocke/d94a90f15f5ad854060fcf14ea453e40 to your computer and use it in GitHub Desktop.
For akaza blog
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 'akaza' | |
class A | |
extend Akaza::Annotation | |
whitespace def sum(input, output) | |
This code is never evaluated. | |
So you can write any | |
sentences as comments! | |
end | |
end | |
a = A.new | |
input = StringIO.new("20\n22\n") | |
output = StringIO.new | |
a.sum(input, output) | |
p output.string # => "42" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment