Skip to content

Commit

Permalink
removed an useless YAML require
Browse files Browse the repository at this point in the history
  • Loading branch information
mattetti committed Apr 22, 2010
1 parent 5c1d89a commit 222c32f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
7 changes: 3 additions & 4 deletions lib/templater.rb
@@ -1,6 +1,5 @@
require_relative 'gamercard'
require_relative 'template'
require 'yaml'

class Gamercard
class Templater
Expand All @@ -9,9 +8,9 @@ class Templater

# Pass an optional template path in the option hash to use a custom path.
def initialize(template_data)
template_path = template_data.delete('template_path')
template_path = template_data.delete('template_path')
@templates_path = template_path || File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
@template = load_template(template_data)
@template = load_template(template_data)
self
end

Expand All @@ -34,4 +33,4 @@ def load_template(template_data)
end
end
end
end
end
6 changes: 3 additions & 3 deletions lib/templates/basic.rb
Expand Up @@ -41,9 +41,9 @@ def username_font
def generate(username, stats={})
@username = username
@filename = "#{username}.png"
@stats = stats
@d = Draw.new
@base = gradient_background # uses the template helper with default values
@stats = stats
@d = Draw.new
@base = gradient_background # uses the template helper with default values
username_label
@generated = true
end
Expand Down

0 comments on commit 222c32f

Please sign in to comment.