class Drupid::Library

Public Class Methods

new(name) click to toggle source
Calls superclass method Drupid::Component::new
   # File lib/drupid/library.rb
25 def initialize name
26   super
27   self.download_type = 'file' # Default download type
28   @destination = nil
29 end

Public Instance Methods

destination() click to toggle source
   # File lib/drupid/library.rb
31 def destination
32   return Pathname.new('libraries') unless @destination
33   return Pathname.new(@destination)
34 end
destination=(d) click to toggle source
   # File lib/drupid/library.rb
36 def destination=(d)
37   @destination = d
38 end
fetch() click to toggle source
Calls superclass method Drupid::Component#fetch
   # File lib/drupid/library.rb
46 def fetch
47   debug "Cached location: #{cached_location}"
48   dont_debug { cached_location.rmtree if cached_location.exist? }
49   super
50 end
target_path() click to toggle source

Returns the relative path where this library should be installed within a platform. This is ‘libraries/#name’ by default.

   # File lib/drupid/library.rb
42 def target_path
43   return destination + subdir + directory_name
44 end