class Pipeline::Mounters
Attributes
target[R]
warnings[R]
Public Class Methods
add(klass)
click to toggle source
# File lib/pipeline/mounters.rb, line 11 def self.add klass @mounters << klass unless @mounters.include? klass end
get_mounter_name(mounter_class)
click to toggle source
# File lib/pipeline/mounters.rb, line 47 def self.get_mounter_name mounter_class mounter_class.to_s.split("::").last end
mount(tracker)
click to toggle source
# File lib/pipeline/mounters.rb, line 27 def self.mount tracker target = tracker.options[:target] Pipeline.debug "Mounting target: #{target}" trigger = Pipeline::Event.new(tracker.options[:appname]) @mounters.each do | c | mounter = c.new trigger, tracker.options begin Pipeline.debug "Checking about mounting #{target} with #{mounter}" if mounter.supports? target Pipeline.notify "Mounting #{target} with #{mounter}" path = mounter.mount target Pipeline.notify "Mounted #{target} with #{mounter}" return path end rescue => e Pipeline.notify e.message end end end
mounters()
click to toggle source
# File lib/pipeline/mounters.rb, line 15 def self.mounters @mounters end
new()
click to toggle source
# File lib/pipeline/mounters.rb, line 19 def initialize @warnings = [] end
Public Instance Methods
add_warning(warning)
click to toggle source
# File lib/pipeline/mounters.rb, line 23 def add_warning warning @warnings << warning end