Class: Mystro::Cloud::Listener
- Inherits:
-
Model
- Object
- Model
- Mystro::Cloud::Listener
show all
- Defined in:
- lib/mystro/cloud/model/listener.rb
Instance Attribute Summary
Attributes inherited from Model
#data
Instance Method Summary
collapse
Methods inherited from Model
#[], #[]=, #alias_for, alias_for, #attribute_for, attribute_for, #class_for, class_for, #initialize, #load, #normal_key, normal_key, #validate!, validate!
Instance Method Details
#from ⇒ Object
12
13
14
|
# File 'lib/mystro/cloud/model/listener.rb', line 12
def from
"#{protocol}:#{port}"
end
|
#to ⇒ Object
16
17
18
|
# File 'lib/mystro/cloud/model/listener.rb', line 16
def to
"#{to_protocol}:#{to_port}"
end
|
#to_hash ⇒ Object
20
21
22
23
24
25
26
27
|
# File 'lib/mystro/cloud/model/listener.rb', line 20
def to_hash
{
to: to,
from: from,
policy: policy,
cert: cert,
}.delete_if {|k, v| v.nil?}
end
|