Class: Chemicalml::Convention::Molecular::Constraints::BondMustHaveOrder
- Inherits:
-
Constraint::NodeConstraint
- Object
- Constraint
- Constraint::NodeConstraint
- Chemicalml::Convention::Molecular::Constraints::BondMustHaveOrder
- Defined in:
- lib/chemicalml/convention/molecular/constraints/bond_must_have_order.rb
Instance Method Summary collapse
Methods inherited from Constraint::NodeConstraint
Instance Method Details
#check_node(node, path) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/chemicalml/convention/molecular/constraints/bond_must_have_order.rb', line 8 def check_node(node, path) return [] unless node.is_a?(Chemicalml::Cml::Role::Bond) return [] unless node.order.to_s.strip.empty? [violation(path: path.empty? ? "bond" : path.join("/"), message: "bond must have an order attribute")] end |