Permalink
Browse files

added Float data property support

  • Loading branch information...
1 parent ccf6c98 commit b39636d39c27a1c122d286f39d7bd252f4a89de5 @naoyamakino naoyamakino committed Nov 25, 2012
View
@@ -7,3 +7,4 @@ resources/*.nib
resources/*.momd
resources/*.storyboardc
examples/**/*.nib
+tags
View
@@ -8,6 +8,7 @@ class Author
hasMany :articles, :destinationEntity => Article.entityDescription, :inverse => :author
property :name, String, :required => true
+ property :fee, Float
end
class Article
@@ -9,6 +9,9 @@ class Integer16
class Transformable
end
+
+ class Float
+ end
end
class ManagedObject < MotionDataManagedObjectBase
@@ -72,6 +72,8 @@ def self.withReflection(reflection)
NSTransformableAttributeType
elsif type == CoreTypes::Integer16
NSInteger16AttributeType
+ elsif type == CoreTypes::Float
+ NSFloatAttributeType
else
# Transient types?
NSUndefinedAttributeType
@@ -1,3 +1,3 @@
module MotionData
- VERSION = "0.0.3"
+ VERSION = "0.0.4"
end
@@ -34,6 +34,12 @@ module MotionData
author.name.should == "Edgar Allan Poe"
end
+ it "includes Float support" do
+ author = Author.new
+ author.fee = 200.00
+ author.fee.should == 200.00
+ end
+
it "generates a predicate method to access a boolean property which returns false/false instead of 0/1" do
article = Article.new
article.published?.should == false
Binary file not shown.

0 comments on commit b39636d

Please sign in to comment.