Class: NeoScout::GDB_Neo4j::Constraints::PropConstraint
- Inherits:
-
Constraints::PropConstraint
- Object
- Constraints::Constraint
- Constraints::PropConstraint
- NeoScout::GDB_Neo4j::Constraints::PropConstraint
- Defined in:
- lib/neoscout/gdb_neo4j.rb
Instance Attribute Summary
Attributes inherited from Constraints::PropConstraint
Instance Method Summary collapse
Methods inherited from Constraints::PropConstraint
Methods inherited from Constraints::Constraint
#satisfied_by_edge?, #satisfied_by_node?
Constructor Details
This class inherits a constructor from NeoScout::Constraints::PropConstraint
Instance Method Details
#satisfied_by?(typer, obj) ⇒ Boolean
9 10 11 12 13 14 |
# File 'lib/neoscout/gdb_neo4j.rb', line 9 def satisfied_by?(typer, obj) if obj.property?(@name) then satisfies_type?(typer, @type, obj[@name]) else self.opt end end |
#satisfies_type?(typer, type, value) ⇒ Boolean
16 17 18 |
# File 'lib/neoscout/gdb_neo4j.rb', line 16 def satisfies_type?(typer, type, value) if type then typer.valid_value?(type, value) else true end end |