lib/ooz/model/ooze.rb in ooze-parser-0.1.7 vs lib/ooz/model/ooze.rb in ooze-parser-0.1.8

- old
+ new

@@ -4,10 +4,15 @@ overridable_const :evolution_class, Model::Evolution overridable_const :section_class, Model::Section overridable_const :field_factory_class, Model::FieldFactory overridable_const :force_class, Model::Force + def tagged?(tag, search_on: :tags) + haystack = self.send(search_on) + haystack.include?(tag) + end + def stages? evolution && evolution.stages&.length > 0 end def stages @@ -33,11 +38,11 @@ def fields membranes end - def fields_hash - to_hash(fields) + def fields_hash(key: "_id") + to_hash(fields, key: key) end def sections flow_nodes end