Dorian Snowball %!s(int64=2) %!d(string=hai) anos
pai
achega
30188124b7
Modificáronse 2 ficheiros con 15 adicións e 0 borrados
  1. 5 0
      config.store
  2. 10 0
      lib/tron.rb

+ 5 - 0
config.store

@@ -0,0 +1,5 @@
+---
+name: <name>
+password: <password>
+host: <host>
+port: <port>

+ 10 - 0
lib/tron.rb

@@ -1,4 +1,14 @@
 require 'socket'
+require 'yaml/store'
+
+config = YAML::Store.new "config.store"
+config.transaction do
+  $name =  config["name"]
+  $password = config["password"]
+  $host = config["host"]
+  $port = config["port"]
+end
+
 
 def connect(host,port)