Class: Aikido::Zen::Request::Schema::AuthSchemas
- Inherits:
-
Object
- Object
- Aikido::Zen::Request::Schema::AuthSchemas
- Defined in:
- lib/aikido/zen/request/schema/auth_schemas.rb
Defined Under Namespace
Classes: ApiKey, Authorization
Constant Summary collapse
- NONE =
new([])
Instance Attribute Summary collapse
-
#schemas ⇒ Object
readonly
Returns the value of attribute schemas.
Instance Method Summary collapse
- #==(other) ⇒ Object
- #as_json ⇒ Object
-
#initialize(schemas) ⇒ AuthSchemas
constructor
A new instance of AuthSchemas.
- #merge(other) ⇒ Object (also: #|)
Constructor Details
#initialize(schemas) ⇒ AuthSchemas
Returns a new instance of AuthSchemas.
8 9 10 |
# File 'lib/aikido/zen/request/schema/auth_schemas.rb', line 8 def initialize(schemas) @schemas = schemas end |
Instance Attribute Details
#schemas ⇒ Object (readonly)
Returns the value of attribute schemas.
6 7 8 |
# File 'lib/aikido/zen/request/schema/auth_schemas.rb', line 6 def schemas @schemas end |
Instance Method Details
#==(other) ⇒ Object
21 22 23 |
# File 'lib/aikido/zen/request/schema/auth_schemas.rb', line 21 def ==(other) other.is_a?(self.class) && schemas == other.schemas end |
#as_json ⇒ Object
17 18 19 |
# File 'lib/aikido/zen/request/schema/auth_schemas.rb', line 17 def as_json @schemas.map(&:as_json) unless @schemas.empty? end |
#merge(other) ⇒ Object Also known as: |
12 13 14 |
# File 'lib/aikido/zen/request/schema/auth_schemas.rb', line 12 def merge(other) self.class.new((schemas + other.schemas).uniq) end |