Class: Workbench::Exporter

Inherits:
Object
  • Object
show all
Defined in:
lib/work_bench/exporter.rb

Overview

Export project to specific directory

Instance Method Summary collapse

Constructor Details

#initialize(src, dst, fix = false) ⇒ Exporter

Returns a new instance of Exporter.

Parameters:

  • src (String)

    source directory

  • dst (String)

    destination directory

  • fix (Boolean) (defaults to: false)

    fix relative url



9
10
11
12
13
14
# File 'lib/work_bench/exporter.rb', line 9

def initialize src, dst, fix = false
  @fix = fix
  @src = src
  @dst = dst
  @browser = Rack::Test::Session.new(Rack::MockSession.new(Workbench::Application.new(src).app))
end

Instance Method Details

#processObject

Process export



17
18
19
20
21
22
# File 'lib/work_bench/exporter.rb', line 17

def process
  puts 'Exporting project'.color(:green)
  compile_sass
  copy_public_folder
  copy_views
end