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.



186
187
188
189
190
191
192
# File 'lib/rig/template.rb', line 186

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

Instance Method Details

#cert(cert) ⇒ Object



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

def cert(cert)
  @cert = cert
end

#from(proto, port) ⇒ Object



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

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

#specObject



208
209
210
211
212
213
214
# File 'lib/rig/template.rb', line 208

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

#to(proto, port) ⇒ Object



199
200
201
202
# File 'lib/rig/template.rb', line 199

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