Skip to content

Instantly share code, notes, and snippets.

@pocke pocke/sum2.rb
Last active Apr 30, 2019

Embed
What would you like to do?
For akaza blog
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
You can’t perform that action at this time.