Class: JqueryWeekCalendar::Install

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/jquery-week-calendar/generators.rb

Constant Summary collapse

JAVASCRIPTS =
File.expand_path('../../../vendor/assets/javascripts', __FILE__)
STYLESHEETS =
File.expand_path('../../../vendor/assets/stylesheets', __FILE__)

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



8
9
10
# File 'lib/jquery-week-calendar/generators.rb', line 8

def self.source_root
  @source_root ||= JAVASCRIPTS
end

Instance Method Details

#copy_calendarObject



12
13
14
15
16
17
18
19
20
21
22
# File 'lib/jquery-week-calendar/generators.rb', line 12

def copy_calendar
  Dir[File.join(JAVASCRIPTS, '*.js')].each do |file|
    file = File.split(file).last
    copy_file file, "public/javascripts/#{file}"
  end

  Dir[File.join(STYLESHEETS, '*.css')].each do |file|
    file = File.split(file).last
    copy_file file, "public/stylesheets/#{file}"
  end
end