Skip to content
A DSL to create examples
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
examples
lib
test
.gitignore
Gemfile
README.rdoc
Rakefile
VERSION.yml
exemplar.gemspec

README.rdoc

An example

require 'exemplar'

example "adding two numbers together" do
  puts "1 + 5 = %s" % (1 + 5)
end

example "subtracting a number" do
  puts "5 - 1 = %s" % (5 - 1 )
end

This will produce:

Running example adding two numbers together...
1 + 5 = 6
Done running example adding two numbers together
Running example subtracting a number...
5 - 1 = 4
Done running example subtracting a number

See examples/ for more involved examples.

License and Copyright

All of the code is copyrighted by Google and is released under MIT license.

Something went wrong with that request. Please try again.