Class: OasParser::Callback

Inherits:
Payload
  • Object
show all
Includes:
RawAccessor
Defined in:
lib/oas_parser_reborn/callback.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from RawAccessor

included, #method_missing, #respond_to_missing?

Methods inherited from Payload

#exhibits_one_of_multiple_schemas?, #formats, #schema, #split_schemas

Constructor Details

#initialize(endpoint, name, raw) ⇒ Callback

Returns a new instance of Callback.



8
9
10
11
12
# File 'lib/oas_parser_reborn/callback.rb', line 8

def initialize(endpoint, name, raw)
  @endpoint = endpoint
  @name = name
  @raw = raw
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OasParser::RawAccessor

Instance Attribute Details

#endpointObject

Returns the value of attribute endpoint.



6
7
8
# File 'lib/oas_parser_reborn/callback.rb', line 6

def endpoint
  @endpoint
end

#nameObject

Returns the value of attribute name.



6
7
8
# File 'lib/oas_parser_reborn/callback.rb', line 6

def name
  @name
end

#rawObject

Returns the value of attribute raw.



6
7
8
# File 'lib/oas_parser_reborn/callback.rb', line 6

def raw
  @raw
end

Instance Method Details

#pathsObject



14
15
16
17
18
# File 'lib/oas_parser_reborn/callback.rb', line 14

def paths
  raw.map do |path, definition|
    OasParser::Path.new(self, path, definition)
  end
end