Class: Bindery::Chapter
- Inherits:
-
Object
- Object
- Bindery::Chapter
- Defined in:
- lib/bindery/chapter.rb
Instance Attribute Summary collapse
-
#file ⇒ Object
Returns the value of attribute file.
-
#options ⇒ Object
Returns the value of attribute options.
-
#title ⇒ Object
Returns the value of attribute title.
Instance Method Summary collapse
- #body_only? ⇒ Boolean
- #include_images? ⇒ Boolean
-
#initialize(title, file, options) ⇒ Chapter
constructor
A new instance of Chapter.
- #valid? ⇒ Boolean
Constructor Details
#initialize(title, file, options) ⇒ Chapter
Returns a new instance of Chapter.
7 8 9 10 11 |
# File 'lib/bindery/chapter.rb', line 7 def initialize(title, file, ) self.title = title self.file = file self. = end |
Instance Attribute Details
#file ⇒ Object
Returns the value of attribute file.
3 4 5 |
# File 'lib/bindery/chapter.rb', line 3 def file @file end |
#options ⇒ Object
Returns the value of attribute options.
5 6 7 |
# File 'lib/bindery/chapter.rb', line 5 def @options end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/bindery/chapter.rb', line 4 def title @title end |
Instance Method Details
#body_only? ⇒ Boolean
20 21 22 |
# File 'lib/bindery/chapter.rb', line 20 def body_only? .fetch(:body_only, true) end |
#include_images? ⇒ Boolean
24 25 26 |
# File 'lib/bindery/chapter.rb', line 24 def include_images? .fetch(:include_images, true) end |
#valid? ⇒ Boolean
13 14 15 16 17 18 |
# File 'lib/bindery/chapter.rb', line 13 def valid? true # title specified # file exists, readable # file content properly formed? Does that matter? Can we verify it? end |