Module: OctopressThemes::PopularPost::Utilities

Defined in:
lib/popular_posts/utilities.rb

Constant Summary collapse

PLUGINS_DIR =
File.expand_path(File.dirname(__FILE__) + '/../../templates/plugins')
ASIDES_DIR =
File.expand_path(File.dirname(__FILE__) + '/../../templates/asides')

Class Method Summary collapse

Class Method Details

.installObject

Public: Installs the templates to the designated locations

Examples

OctopressThemes::PopularPost.install
# => nil

Returns nothing



17
18
19
20
# File 'lib/popular_posts/utilities.rb', line 17

def self.install
  FileUtils.copy_file plugin_path, plugin_destination
  FileUtils.copy_file aside_path, aside_destination
end

.removeObject

Public: Removes plugin files

Examples

OctopressThemes::PopularPost.remove
# => nil

Returns nothing



30
31
32
33
# File 'lib/popular_posts/utilities.rb', line 30

def self.remove
  FileUtils.rm plugin_destination
  FileUtils.rm aside_destination
end