Class: OpenapiBlocks::Configuration::ServersBuilder
- Inherits:
-
Object
- Object
- OpenapiBlocks::Configuration::ServersBuilder
- Defined in:
- lib/openapi_blocks/configuration/servers_builder.rb
Overview
rubocop:disable Style/Documentation
Instance Attribute Summary collapse
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
Instance Method Summary collapse
-
#initialize ⇒ ServersBuilder
constructor
A new instance of ServersBuilder.
- #server(&block) ⇒ Object
Constructor Details
#initialize ⇒ ServersBuilder
Returns a new instance of ServersBuilder.
10 11 12 |
# File 'lib/openapi_blocks/configuration/servers_builder.rb', line 10 def initialize @servers = [] end |
Instance Attribute Details
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
8 9 10 |
# File 'lib/openapi_blocks/configuration/servers_builder.rb', line 8 def servers @servers end |
Instance Method Details
#server(&block) ⇒ Object
14 15 16 17 18 |
# File 'lib/openapi_blocks/configuration/servers_builder.rb', line 14 def server(&block) s = ServerBuilder.new s.instance_eval(&block) if block @servers << s end |