dev_projects 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/projects.rb +5 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 08817c69a45273d54a0cee0211006b9053853e13
4
- data.tar.gz: ba800584afc627dec44d7d2d64e4bf0458a7fdf1
3
+ metadata.gz: 616993352822865dd04ba548362f4f5a9acc826b
4
+ data.tar.gz: f84d0e04d5ab8971634785d2c7b435a884027e8e
5
5
  SHA512:
6
- metadata.gz: 1d33c52beab9b87f7dc51cf244a6a2b21cf23c85cee834ea8d7305a7e3463cc5470eaf9ff83573696a895ceca4a0b4a784669dad977ea025cd2040a6778aa9a7
7
- data.tar.gz: ae80ee106d316814a7a2a1a1a2412bab96ee8b833df40fbdeb42e5055d1966c17165cbffe9b1d18a0cb3c9be76624f95434c07050f77e3b24839c90360eaf092
6
+ metadata.gz: f204f8f17bb74114ff72e6a823472ab22f9da3e875110e18e3618f6b6ac62534bd6888f33e63f271cad31ba5aac7ae69627581ff3ee6991ac574db7114ea42d8
7
+ data.tar.gz: c3281862e257cc790e3e31df750acb94e9a08019f01106db4af322e3628beb112a0d83ecd3bdf639dbb9c7503a428bd6453127ae44f5703b776ab1595fdfa7ec
data/lib/projects.rb CHANGED
@@ -4,6 +4,10 @@ require 'json'
4
4
  class Projects < Hash
5
5
  attr_accessor :filename
6
6
 
7
+ def initialize
8
+ @filename=''
9
+ end
10
+
7
11
  def update
8
12
  self.each{|k,v|
9
13
  self[k]=Project.new(v) if(v.is_a?(String))
@@ -13,7 +17,7 @@ class Projects < Hash
13
17
  end
14
18
 
15
19
  def save filename=''
16
- @filename=filename if filename.length > 0
20
+ @filename=filename if !filename.nil? && filename.length > 0
17
21
  File.open(@filename,'w'){|f|f.write(self.to_json)} if @filename.length > 0
18
22
  end
19
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_projects
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow