Module: Tensai::Pddl::DataTypes
- Defined in:
- lib/tensai/pddl/data_types.rb,
lib/tensai/pddl/data_types/base.rb,
lib/tensai/pddl/data_types/terms.rb,
lib/tensai/pddl/data_types/variable_list.rb
Overview
Types for argument validations
Defined Under Namespace
Modules: Base
Constant Summary collapse
- Name =
Base::String .constrained(format: /^[a-z][a-z\d\-_]*$/) .constructor(&:to_s)
- Term =
Base::Instance(Entity) | Base::Instance(Variable)
- Terms =
Base::Hash.map(Name, Term)
- VariableList =
ListOf(Variable)
Class Method Summary collapse
Class Method Details
.InstanceOf(type) ⇒ Object
18 19 20 |
# File 'lib/tensai/pddl/data_types.rb', line 18 def InstanceOf(type) Base::Instance(type) end |
.ListOf(type) ⇒ Object
22 23 24 25 |
# File 'lib/tensai/pddl/data_types.rb', line 22 def ListOf(type) InstanceOf(NamedList) .constructor(->(elements) { NamedList.new(type, elements) }) end |