Class: Bundler::Security::Voting::RemotePolicy

Inherits:
Struct
  • Object
show all
Defined in:
lib/bundler/security/voting/remote_policy.rb

Overview

Remote policy settings from Coditsu

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#thresholdObject

Returns the value of attribute threshold

Returns:

  • (Object)

    the current value of threshold



7
8
9
# File 'lib/bundler/security/voting/remote_policy.rb', line 7

def threshold
  @threshold
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



7
8
9
# File 'lib/bundler/security/voting/remote_policy.rb', line 7

def type
  @type
end

Instance Method Details

#approvedInteger

How many time gem was marked as safe

Returns:

  • (Integer)


11
12
13
# File 'lib/bundler/security/voting/remote_policy.rb', line 11

def approved
  threshold['up'].to_i
end

#rejectedInteger

How many time gem was marked as malicious

Returns:

  • (Integer)


18
19
20
# File 'lib/bundler/security/voting/remote_policy.rb', line 18

def rejected
  threshold['down'].to_i
end