Anonymous user
Execute HQ9+/Ruby: Difference between revisions
m
formatting
(add Ruby) |
m (formatting) |
||
Line 2:
<lang ruby>class HQ9plus
def initialize(opts={})
@program = if opts[:program] then opts[:program]
elsif opts[:filename] then File.read(opts[:filename])
else ''
Line 11:
def run
@program.downcase.each_char do |char|
self.send
end
end
|