Class: Aikido::Zen::Package
- Inherits:
-
Struct
- Object
- Struct
- Aikido::Zen::Package
- Defined in:
- lib/aikido/zen/package.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#version ⇒ Object
Returns the value of attribute version.
Instance Method Summary collapse
- #as_json ⇒ Object
-
#initialize(name, version, sinks = Aikido::Zen::Sinks.registry) ⇒ Package
constructor
A new instance of Package.
-
#supported? ⇒ Boolean
Whether we explicitly protect against exploits in this library.
Constructor Details
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name
6 7 8 |
# File 'lib/aikido/zen/package.rb', line 6 def name @name end |
#version ⇒ Object
Returns the value of attribute version
6 7 8 |
# File 'lib/aikido/zen/package.rb', line 6 def version @version end |
Instance Method Details
#as_json ⇒ Object
18 19 20 |
# File 'lib/aikido/zen/package.rb', line 18 def as_json {name => version.to_s} end |
#supported? ⇒ Boolean
Returns whether we explicitly protect against exploits in this library.
14 15 16 |
# File 'lib/aikido/zen/package.rb', line 14 def supported? @sinks.include?(name) end |