Class: Swagger::Grape::Method

Inherits:
Object
  • Object
show all
Defined in:
lib/ruby-swagger/grape/method.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(route_name, route) ⇒ Method

Returns a new instance of Method.



8
9
10
11
12
13
14
15
16
17
18
19
20
# File 'lib/ruby-swagger/grape/method.rb', line 8

def initialize(route_name, route)
  @route_name = route_name
  @route = route
  @types = []
  @scopes = []

  new_operation
  operation_params
  operation_responses
  operation_security

  self
end

Instance Attribute Details

#operationObject (readonly)

Returns the value of attribute operation.



6
7
8
# File 'lib/ruby-swagger/grape/method.rb', line 6

def operation
  @operation
end

#scopesObject (readonly)

Returns the value of attribute scopes.



6
7
8
# File 'lib/ruby-swagger/grape/method.rb', line 6

def scopes
  @scopes
end

#typesObject (readonly)

Returns the value of attribute types.



6
7
8
# File 'lib/ruby-swagger/grape/method.rb', line 6

def types
  @types
end