Last active
April 30, 2019 16:16
-
-
Save pocke/d4c55e22b3fb5c5fcd5a6016889c3a68 to your computer and use it in GitHub Desktop.
For akaza blog
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 'akaza' | |
class A | |
extend Akaza::Annotation | |
whitespace def sum(a, b) | |
input=StringIO.new("#{a}\n#{b}\n") | |
output=StringIO.new | |
Akaza::Body | |
output.string.to_i | |
end | |
end | |
a = A.new | |
p a.sum(20, 22) # => 42 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment