lib/attentive/entities/core/number/positive.rb in attentive-0.2.0 vs lib/attentive/entities/core/number/positive.rb in attentive-0.3.0
- old
+ new
@@ -1,6 +1,6 @@
-require "attentive/entities/core/number/integer/positive"
-require "attentive/entities/core/number/float/positive"
+require "attentive/entity"
-Attentive::CompositeEntity.define "core.number.positive",
- "core.number.float.positive",
- "core.number.integer.positive"
+Attentive::Entity.define "core.number.positive", "{{number:core.number}}", published: false do |match|
+ nomatch! if match["number"] <= 0
+ match["number"]
+end