smsc_manager 0.2.3 → 0.2.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/smsc_manager/smsc_connection.rb +5 -3
- data/lib/smsc_manager/version.rb +1 -1
- metadata +1 -1
@@ -33,13 +33,15 @@ class SmscConnection
|
|
33
33
|
|
34
34
|
def dump
|
35
35
|
#change this in database or here
|
36
|
-
|
36
|
+
test_path=self.path_to_config
|
37
|
+
puts "Path to config file is: #{test_path}"
|
38
|
+
config = File.open(test_path,'w') { |f| YAML.dump(self,f) }
|
37
39
|
end
|
38
40
|
def self.load_smsc
|
39
41
|
#change this in database or here
|
40
42
|
test_path=self.path_to_config
|
41
|
-
puts "Path to config is: #{test_path}"
|
42
|
-
config = File.open(
|
43
|
+
puts "Path to config file is: #{test_path}"
|
44
|
+
config = File.open(test_path) { |f| YAML.load(f) }
|
43
45
|
#puts "config is: #{config} config.class is: #{config.class}"
|
44
46
|
if config.class==SmscManager::SmscConnection
|
45
47
|
smsc=config
|
data/lib/smsc_manager/version.rb
CHANGED