Class: Cheatset::Creator

Inherits:
Object
  • Object
show all
Defined in:
lib/cheatset/creator.rb

Instance Method Summary collapse

Constructor Details

#initialize(cheatsheet) ⇒ Creator

Returns a new instance of Creator.



9
10
11
12
13
# File 'lib/cheatset/creator.rb', line 9

def initialize(cheatsheet)
  @cheatsheet = cheatsheet
  @docset_path = "#{@cheatsheet.docset_file_name}.docset"
  @path = "#{@docset_path}/Contents/"
end

Instance Method Details

#generateObject



15
16
17
18
19
20
21
# File 'lib/cheatset/creator.rb', line 15

def generate
  FileUtils.rm_rf(@path)
  FileUtils.mkdir_p(@path)
  generate_html_file
  generate_plist_file
  generate_database
end