Class: Pipeline::URLMounter

Inherits:
BaseMounter show all
Defined in:
lib/pipeline/mounters/url_mounter.rb

Instance Attribute Summary

Attributes inherited from BaseMounter

#description, #errors, #name, #trigger

Instance Method Summary collapse

Methods inherited from BaseMounter

#error

Constructor Details

#initialize(trigger, options) ⇒ URLMounter

Returns a new instance of URLMounter.



6
7
8
9
10
11
# File 'lib/pipeline/mounters/url_mounter.rb', line 6

def initialize trigger, options
  super(trigger)
  @options = options
  @name = "URL"
  @description = "Mount a url - typically for a live attack."
end

Instance Method Details

#mount(target) ⇒ Object



13
14
15
# File 'lib/pipeline/mounters/url_mounter.rb', line 13

def mount target
  return target
end

#supports?(target) ⇒ Boolean

Returns:

  • (Boolean)


17
18
19
20
21
22
23
24
25
26
27
# File 'lib/pipeline/mounters/url_mounter.rb', line 17

def supports? target
  start = target.slice(0,4)
  last = target.slice(-4,target.length)
  if last === ".git"
    return false
  elsif start === "http"
    return true
  else
    return false
  end
end