Created
February 20, 2010 11:22
-
-
Save kremso/309633 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'rubygems' | |
require 'serenity' | |
class Showcase | |
include Serenity::Generator | |
Person = Struct.new(:name, :items) | |
Item = Struct.new(:name, :usage) | |
def generate_showcase | |
@title = 'Serenity inventory' | |
mals_items = [Item.new('Moses Brothers Self-Defense Engine Frontier Model B', 'Lock and load')] | |
mal = Person.new('Malcolm Reynolds', mals_items) | |
jaynes_items = [Item.new('Vera', 'Callahan full-bore auto-lock with a customized trigger, double cartridge and thorough gauge'), | |
Item.new('Lux', 'Ratatata'), | |
Item.new('Knife', 'Cut-throat')] | |
jayne = Person.new('Jayne Cobb', jaynes_items) | |
@crew = [mal, jayne] | |
render_odt 'showcase.odt' | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment