Class: Bookery::Chapter

Inherits:
Object
  • Object
show all
Defined in:
lib/bookery/chapter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(chapter_dir) ⇒ Chapter

Returns a new instance of Chapter.



5
6
7
8
# File 'lib/bookery/chapter.rb', line 5

def initialize(chapter_dir)
  @name = sanitize_name(chapter_dir)
  @dir = chapter_dir
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



3
4
5
# File 'lib/bookery/chapter.rb', line 3

def name
  @name
end

Instance Method Details

#markupObject



10
11
12
# File 'lib/bookery/chapter.rb', line 10

def markup
  @markup ||= concatenate_files
end