Class: Mystro::Cloud::Listener

Inherits:
Model
  • Object
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!

Constructor Details

This class inherits a constructor from Mystro::Cloud::Model

Instance Method Details

#fromObject



12
13
14
# File 'lib/mystro/cloud/model/listener.rb', line 12

def from
  "#{protocol}:#{port}"
end

#toObject



16
17
18
# File 'lib/mystro/cloud/model/listener.rb', line 16

def to
  "#{to_protocol}:#{to_port}"
end

#to_hashObject



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