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, &block) ⇒ ParametersInType

Returns a new instance of ParametersInType.



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

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

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

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



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

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

Instance Method Details

#respond_to_missing?(name, include_private) ⇒ Boolean

Returns:

  • (Boolean)


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

def respond_to_missing?(name, include_private)
  true
end