projects
/
quanlib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
0104e60
)
Track filename in book
author
Chris Jaekl
<cejaekl@yahoo.com>
Thu, 23 Feb 2017 13:09:15 +0000
(22:09 +0900)
committer
Chris Jaekl
<cejaekl@yahoo.com>
Thu, 23 Feb 2017 13:09:15 +0000
(22:09 +0900)
book.rb
patch
|
blob
|
history
diff --git
a/book.rb
b/book.rb
index 5f14aed14790523eaa012e07857d650bfb43b1e2..814d890a382c9895978746f0df1bcf012216f504 100644
(file)
--- a/
book.rb
+++ b/
book.rb
@@
-5,6
+5,7
@@
class Book
def initialize(fileName)
@author = nil
@cover = nil
def initialize(fileName)
@author = nil
@cover = nil
+ @path = fileName
@series = nil
@title = nil
@volume = nil
@series = nil
@title = nil
@volume = nil
@@
-28,6
+29,9
@@
class Book
def inspect
data = []
def inspect
data = []
+ if nil != @author
+ data.push('author="' + @author + '"')
+ end
if nil != @series
data.push('series="' + @series + '"')
end
if nil != @series
data.push('series="' + @series + '"')
end
@@
-37,8
+41,8
@@
class Book
if nil != @title
data.push('title="' + @title + '"')
end
if nil != @title
data.push('title="' + @title + '"')
end
- if nil != @
author
- data.push('
author="' + @author
+ '"')
+ if nil != @
path
+ data.push('
path="' + @path
+ '"')
end
return '(Book:' + data.join(',') + ')'
end
end
return '(Book:' + data.join(',') + ')'
end