Class: Kumonos::Routes::Vhost
- Inherits:
-
Struct
- Object
- Struct
- Kumonos::Routes::Vhost
- Defined in:
- lib/kumonos/routes.rb
Instance Attribute Summary collapse
-
#domains ⇒ Object
Returns the value of attribute domains.
-
#name ⇒ Object
Returns the value of attribute name.
-
#routes ⇒ Object
Returns the value of attribute routes.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#domains ⇒ Object
Returns the value of attribute domains
15 16 17 |
# File 'lib/kumonos/routes.rb', line 15 def domains @domains end |
#name ⇒ Object
Returns the value of attribute name
15 16 17 |
# File 'lib/kumonos/routes.rb', line 15 def name @name end |
#routes ⇒ Object
Returns the value of attribute routes
15 16 17 |
# File 'lib/kumonos/routes.rb', line 15 def routes @routes end |
Class Method Details
Instance Method Details
#to_h ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/kumonos/routes.rb', line 26 def to_h h = super h[:routes] = routes.flat_map do |r| if r.retry_policy.nil? [r.to_h] # i.e. retry with gRPC request (HTTP POST) elsif r.method [r.to_h_with_retry] else [r.to_h_with_retry, r.to_h] end end h end |