MediaWiki Getting Started

From BioRuby

Jump to: navigation, search

To add ruby code, just put it between the < ruby> and < /ruby> tags (without the space after the bigger_than sign). For example:

#!/usr/bin/ruby
class Greeter
  attr_accessor :name
  def initialize(name)
    @name = name
  end
 
  def greet
    return "Hello " + @name
  end
end
g = Greeter.new('Katayama-san')
puts g.greet

Try stuff out in the SandBox.

Personal tools