Sha256: 2e581e9d8c48c4a32fcb2df8e2aada7566e94121918203fb23b7a7371dc1456e

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

# frozen_string_literal: true

class Rage::OpenAPI::Nodes::Method
  attr_reader :controller, :action, :parents
  attr_accessor :http_method, :http_path, :summary, :tag, :deprecated, :private, :description,
    :request, :responses, :parameters

  def initialize(controller, action, parents)
    @controller = controller
    @action = action
    @parents = parents

    @responses = {}
    @parameters = []
  end

  def root
    @parents[0].root
  end

  def auth
    @parents.flat_map(&:auth)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rage-rb-1.11.0 lib/rage/openapi/nodes/method.rb