Class: Bundler::Audit::Results::InsecureSource
- Defined in:
- lib/bundler/audit/results/insecure_source.rb
Overview
Represents an insecure gem source (ex: git://...
or http://...
).
Instance Attribute Summary collapse
-
#source ⇒ URI::Generic, URI::HTTP
readonly
The insecure
git://
orhttp://
URI.
Instance Method Summary collapse
-
#==(other) ⇒ Boolean
Compares the insecure source with another result.
-
#initialize(source) ⇒ InsecureSource
constructor
Initializes the insecure source result.
-
#to_h ⇒ Hash{Symbol => Object}
Converts the insecure source into a Hash.
-
#to_s ⇒ String
Converts the insecure source result to a String.
Constructor Details
#initialize(source) ⇒ InsecureSource
Initializes the insecure source result.
39 40 41 |
# File 'lib/bundler/audit/results/insecure_source.rb', line 39 def initialize(source) @source = source end |
Instance Attribute Details
#source ⇒ URI::Generic, URI::HTTP (readonly)
The insecure git://
or http://
URI.
31 32 33 |
# File 'lib/bundler/audit/results/insecure_source.rb', line 31 def source @source end |
Instance Method Details
#==(other) ⇒ Boolean
Compares the insecure source with another result.
50 51 52 |
# File 'lib/bundler/audit/results/insecure_source.rb', line 50 def ==(other) self.class == other.class && @source == other.source end |
#to_h ⇒ Hash{Symbol => Object}
Converts the insecure source into a Hash.
68 69 70 71 72 73 |
# File 'lib/bundler/audit/results/insecure_source.rb', line 68 def to_h { type: :insecure_source, source: @source } end |
#to_s ⇒ String
Converts the insecure source result to a String.
59 60 61 |
# File 'lib/bundler/audit/results/insecure_source.rb', line 59 def to_s @source.to_s end |