Skip to content

Instantly share code, notes, and snippets.

@dgtm
Created November 22, 2012 08:50
Show Gist options
  • Save dgtm/4130055 to your computer and use it in GitHub Desktop.
Save dgtm/4130055 to your computer and use it in GitHub Desktop.
Phase I
HTMLHelper
<repl type="ruby">
<code file="timer" operation="append/create">
require 'lib/clock.rb'
class Timer
def tick
Clock.new.rewind
end
end
</code>
<execute>
Timer.new.tick
</execute>
</repl>
YAML
config.yml
- timer.rb
- lib/
- clock.rb
- sleep.rb
HTMLTranslator
- Translate Helper using Ruby Wrapper
Ruby FileSystem Wrapper
FileSystem.create(config.yml)
CODE = - <<END
require 'lib/clock.rb'
def tick
Clock.new.rewind
end
END
FileSystem::File.create(timer,CODE)
FileSystem::File.append(timer,CODE)
Actual Ruby Gem
execute(timer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment