Class: Swagger::DSL::ParametersInType

Inherits:
Object
  • Object
show all
Defined in:
lib/swagger/dsl/parameters_in_type.rb

Instance Method Summary collapse

Constructor Details

#initialize(parent, type, parameter_options, &block) ⇒ ParametersInType

Returns a new instance of ParametersInType.



6
7
8
9
10
11
# File 'lib/swagger/dsl/parameters_in_type.rb', line 6

def initialize(parent, type, parameter_options, &block)
  @parent = parent
  @type = type
  @parameter_options = parameter_options
  instance_eval(&block)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, *args, &block) ⇒ Object



17
18
19
# File 'lib/swagger/dsl/parameters_in_type.rb', line 17

def method_missing(name, *args, &block)
  @parent << Parameter.new(@parameter_options, name, *args, in: @type, &block)
end

Instance Method Details

#respond_to_missing?(name, include_private) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/swagger/dsl/parameters_in_type.rb', line 13

def respond_to_missing?(name, include_private)
  true
end