Class: OpenAPISourceTools::ScopedSecuritySchemeInfo
- Inherits:
-
Object
- Object
- OpenAPISourceTools::ScopedSecuritySchemeInfo
- Includes:
- Comparable
- Defined in:
- lib/openapi/sourcetools/securityschemes.rb
Instance Attribute Summary collapse
-
#scopes ⇒ Object
readonly
Returns the value of attribute scopes.
-
#ssi ⇒ Object
readonly
Returns the value of attribute ssi.
Instance Method Summary collapse
- #<=>(other) ⇒ Object
-
#initialize(ssi, scopes) ⇒ ScopedSecuritySchemeInfo
constructor
A new instance of ScopedSecuritySchemeInfo.
- #merge(other) ⇒ Object
Constructor Details
#initialize(ssi, scopes) ⇒ ScopedSecuritySchemeInfo
Returns a new instance of ScopedSecuritySchemeInfo.
80 81 82 83 |
# File 'lib/openapi/sourcetools/securityschemes.rb', line 80 def initialize(ssi, scopes) @ssi = ssi @scopes = scopes end |
Instance Attribute Details
#scopes ⇒ Object (readonly)
Returns the value of attribute scopes.
78 79 80 |
# File 'lib/openapi/sourcetools/securityschemes.rb', line 78 def scopes @scopes end |
#ssi ⇒ Object (readonly)
Returns the value of attribute ssi.
78 79 80 |
# File 'lib/openapi/sourcetools/securityschemes.rb', line 78 def ssi @ssi end |
Instance Method Details
#<=>(other) ⇒ Object
90 91 92 93 |
# File 'lib/openapi/sourcetools/securityschemes.rb', line 90 def <=>(other) # Only really interested in equality. @ssi <=> other.ssi || @scopes <=> other.scopes end |
#merge(other) ⇒ Object
85 86 87 88 |
# File 'lib/openapi/sourcetools/securityschemes.rb', line 85 def merge(other) @ssi = @ssi.merge(other.ssi) @scopes = @scopes.concat(other.scopes).uniq end |