Skip to content

Commit

Permalink
Added example in README
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmitry Ratnikov committed Aug 17, 2010
1 parent f0d0635 commit e1c514c
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 3 deletions.
22 changes: 20 additions & 2 deletions README.rdoc
@@ -1,6 +1,24 @@
== Getting started
== An example

See <tt>examples/algebra.rb</tt> for a simple example.
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 <tt>examples/</tt> for more involved examples.

== License and Copyright

Expand Down
2 changes: 1 addition & 1 deletion exemplar.gemspec
Expand Up @@ -5,7 +5,7 @@

Gem::Specification.new do |s|
s.name = %q{exemplar}
s.version = "0.0.0"
s.version = "0.1.0"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Dmitry Ratnikov"]
Expand Down

0 comments on commit e1c514c

Please sign in to comment.