<snusnu>
do you know how axiom-types is supposed to be used?
<snusnu>
i have to generate a hash of axiom relations based on DM1 model definitions, and without thinking much i just mapped from a DataMapper::Property::* to a builtin ruby type, however, i just hit DataMapper::Property::Boolean and that reminded me of axiom-types
<snusnu>
mbj: no idea but i'll try: Axiom::Types.infer(Integer) and the likes now
<snusnu>
and it doesn't work
<snusnu>
lib/axiom/types/type.rb:113:in `constraint': wrong number of arguments (2 for 0..1) (ArgumentError)
snusnu has quit [Quit: Leaving.]
snusnu has joined #rom-rb
<snusnu>
mbj: around?
<mbj>
snusnu: hola
<snusnu>
mbj: do you have any idea how axiom-types is supposed to be used?
<mbj>
snusnu: axiom-types is an inspectable primitive type predicate used in axiom.
<mbj>
snusnu: inspectable in sense of relectable and useful as an information source when pushing down.
<mbj>
snusnu: predicate in sense of #include?(object) can be used to determine if a cetrain value fulfills the needs of that relation.
<snusnu>
mbj: i'm more concerned with "setting it up" … i iterate over my DM1::Model.descendants, and generate an axiom base relation from them
<snusnu>
mbj: so at some point i have to map from DataMapper::Property::* to something axiom understands, either a primitive, or an Axiom::Type
<snusnu>
so my question is, should i map to Axiom::Types::Type subclasses directly, or shall i just map to primitives
<snusnu>
i couldn't get it to even start when trying to map to axiom type subtypes
<snusnu>
so currently i map like this: DataMapper::Property::String => String
<mbj>
snusnu: gimme a sec to refresh the creation api
<snusnu>
this gets weird when it comes to DataMapper::Property::Boolean tho