Sha256: b56d4a8016d8d7834d19f36cf1592f13f858440744034840d9bb7a8feed13684
Contents?: true
Size: 437 Bytes
Versions: 5
Compression:
Stored size: 437 Bytes
Contents
class Sfp::Module::Client include Sfp::Resource ConfigFile = '/tmp/sfp_client_config' def update_state if File.exist?(ConfigFile) @state['refer'] = File.read(ConfigFile) else @state['refer'] = nil end end def redirect(p={}) return false if !p.has_key?('s') if p['s'].nil? File.delete(ConfigFile) if File.exist?(ConfigFile) else File.open(ConfigFile, 'w') { |f| f.write(p['s'].to_s) } end true end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
nuri-0.5.5 | modules/client/client.rb |
nuri-0.5.4 | modules/client/client.rb |
nuri-0.5.3 | modules/client/client.rb |
nuri-0.5.2 | modules/client/client.rb |
nuri-0.5.1 | modules/client/client.rb |