Skip to content

Commit

Permalink
Author can now be specified alongside title while generating.
Browse files Browse the repository at this point in the history
  • Loading branch information
rizwanreza committed Nov 21, 2010
1 parent b6c7b43 commit ff03ba7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/rdoc/generator/paddle.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ class << self

def initialize options
@options = options
@title = options.title.split(';')[0]
@author = options.title.split(';')[1]
@class_dir = nil
@file_dir = nil
@odir = Pathname.new(options.op_dir).expand_path(Pathname.pwd)
Expand Down Expand Up @@ -49,7 +51,11 @@ def class_dir
end

def title
@options.title
@title
end

def author
@author
end

def identifier
Expand Down
1 change: 1 addition & 0 deletions lib/templates/content.opf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
xmlns:opf="http://www.idpf.org/2007/opf"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<dc:title><%= title %></dc:title>
<dc:creator opf:file-as="<%= author %>" opf:role="aut"><%= author %></dc:creator>
<dc:language xsi:type="dcterms:RFC3066">en</dc:language>
<dc:identifier id="dcidid" opf:scheme="URI">
<%= identifier %>
Expand Down

0 comments on commit ff03ba7

Please sign in to comment.