Class: RevealCK::Builders::SlidesBuilder

Inherits:
CreationTask show all
Defined in:
lib/reveal-ck/builders/slides_builder.rb

Overview

Given a location of reveal.js files, reveal-ck files, and slides file to work with, and a place to put it all.. this class creates a presentation.

Instance Attribute Summary collapse

Attributes inherited from CreationTask

#things_to_create

Instance Method Summary collapse

Methods inherited from CreationTask

#name, #prepare

Methods included from RakeAware

#copy_file, #create_directory, #task

Methods included from Retrieve

included, #retrieve

Constructor Details

#initialize(args) ⇒ SlidesBuilder

Returns a new instance of SlidesBuilder.



13
14
15
16
17
18
19
20
21
22
# File 'lib/reveal-ck/builders/slides_builder.rb', line 13

def initialize(args)
  @user_dir = retrieve(:user_dir, args)
  @gem_dir = retrieve(:gem_dir, args)
  @reveal_js_dir = File.join(gem_dir, 'files', 'reveal.js')
  @output_dir = retrieve(:output_dir, args)
  @slides_file = retrieve(:slides_file, args)
  @application = Rake::Application.new
  @config = args[:config] || Config.new
  @things_to_create = Set.new
end

Instance Attribute Details

#applicationObject (readonly)

Returns the value of attribute application.



12
13
14
# File 'lib/reveal-ck/builders/slides_builder.rb', line 12

def application
  @application
end

#gem_dirObject (readonly)

Returns the value of attribute gem_dir.



10
11
12
# File 'lib/reveal-ck/builders/slides_builder.rb', line 10

def gem_dir
  @gem_dir
end

#output_dirObject (readonly)

Returns the value of attribute output_dir.



11
12
13
# File 'lib/reveal-ck/builders/slides_builder.rb', line 11

def output_dir
  @output_dir
end

#reveal_js_dirObject (readonly)

Returns the value of attribute reveal_js_dir.



10
11
12
# File 'lib/reveal-ck/builders/slides_builder.rb', line 10

def reveal_js_dir
  @reveal_js_dir
end

#slides_fileObject (readonly)

Returns the value of attribute slides_file.



11
12
13
# File 'lib/reveal-ck/builders/slides_builder.rb', line 11

def slides_file
  @slides_file
end

#user_dirObject (readonly)

Returns the value of attribute user_dir.



10
11
12
# File 'lib/reveal-ck/builders/slides_builder.rb', line 10

def user_dir
  @user_dir
end

Instance Method Details

#buildObject



24
25
26
# File 'lib/reveal-ck/builders/slides_builder.rb', line 24

def build
  application['slides_builder'].invoke
end