class Pergo::Server
Public Class Methods
new(options = {})
click to toggle source
# File lib/pergo/server.rb, line 10 def initialize(options = {}) @host = options.fetch(:host, "0.0.0.0") @port = options.fetch(:port, 9732) Propono.config.access_key = config.access_key Propono.config.secret_key = config.secret_key Propono.config.queue_region = config.queue_region Propono.config.udp_host = config.host Propono.config.udp_port = config.port end
run(*args)
click to toggle source
# File lib/pergo/server.rb, line 6 def self.run(*args) new(*args).run end
Public Instance Methods
run()
click to toggle source
# File lib/pergo/server.rb, line 21 def run Propono.listen_to_udp do |text| Propono.publish(config.topic, text) end end
Private Instance Methods
config()
click to toggle source
# File lib/pergo/server.rb, line 29 def config Configuration.instance end