Class: Rig::Template::Listener

Inherits:
Object
  • Object
show all
Defined in:
lib/rig/template.rb

Instance Method Summary collapse

Constructor Details

#initializeListener

Returns a new instance of Listener.



194
195
196
197
198
199
200
# File 'lib/rig/template.rb', line 194

def initialize
  @from_proto = nil
  @from_port  = nil
  @to_proto   = nil
  @to_port    = nil
  @cert       = nil
end

Instance Method Details

#cert(cert) ⇒ Object



212
213
214
# File 'lib/rig/template.rb', line 212

def cert(cert)
  @cert = cert
end

#from(proto, port) ⇒ Object



202
203
204
205
# File 'lib/rig/template.rb', line 202

def from(proto, port)
  @from_proto = proto
  @from_port  = port
end

#specObject



216
217
218
219
220
221
222
# File 'lib/rig/template.rb', line 216

def spec
  {
      :from => "#@from_proto:#@from_port",
      :to   => "#@to_proto:#@to_port",
      :cert => @cert,
  }
end

#to(proto, port) ⇒ Object



207
208
209
210
# File 'lib/rig/template.rb', line 207

def to(proto, port)
  @to_proto = proto
  @to_port  = port
end