Class: Pipeline::URLMounter
- Inherits:
-
BaseMounter
- Object
- BaseMounter
- Pipeline::URLMounter
- Defined in:
- lib/pipeline/mounters/url_mounter.rb
Instance Attribute Summary
Attributes inherited from BaseMounter
#description, #errors, #name, #trigger
Instance Method Summary collapse
-
#initialize(trigger, options) ⇒ URLMounter
constructor
A new instance of URLMounter.
- #mount(target) ⇒ Object
- #supports?(target) ⇒ Boolean
Methods inherited from BaseMounter
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, super(trigger) @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
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 |