property_sets 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.10
@@ -65,7 +65,7 @@ module PropertySets
65
65
  # The finder method which returns the property if present, otherwise a new instance with defaults
66
66
  define_method "lookup" do |arg|
67
67
  instance = detect { |property| property.name.to_sym == arg }
68
- instance ||= property_class.new(@owner.class.name.underscore.to_sym => @owner, :name => arg.to_s)
68
+ instance ||= property_class.new(@owner.class.name.underscore.to_sym => @owner, :name => arg.to_s, :value => property_class.default(arg))
69
69
  PropertySetProxy.new(instance)
70
70
  end
71
71
  end
@@ -10,10 +10,6 @@ module PropertySets
10
10
  !false?
11
11
  end
12
12
 
13
- def value
14
- read_attribute(:value) || self.class.default(name.to_sym)
15
- end
16
-
17
13
  def to_s
18
14
  value.to_s
19
15
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{property_sets}
8
- s.version = "0.0.9"
8
+ s.version = "0.0.10"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Morten Primdahl"]
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: property_sets
3
3
  version: !ruby/object:Gem::Version
4
- hash: 13
4
+ hash: 11
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 9
10
- version: 0.0.9
9
+ - 10
10
+ version: 0.0.10
11
11
  platform: ruby
12
12
  authors:
13
13
  - Morten Primdahl