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