Class: Longjing::PDDL::Type
- Inherits:
-
Object
- Object
- Longjing::PDDL::Type
- Defined in:
- lib/longjing/pddl/type.rb
Constant Summary collapse
- OBJECT =
Type.new(:object)
Instance Attribute Summary collapse
-
#hash ⇒ Object
readonly
Returns the value of attribute hash.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
Instance Method Summary collapse
-
#initialize(name, parent = nil) ⇒ Type
constructor
A new instance of Type.
- #inspect ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Attribute Details
#hash ⇒ Object (readonly)
Returns the value of attribute hash.
4 5 6 |
# File 'lib/longjing/pddl/type.rb', line 4 def hash @hash end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'lib/longjing/pddl/type.rb', line 4 def name @name end |
#parent ⇒ Object (readonly)
Returns the value of attribute parent.
4 5 6 |
# File 'lib/longjing/pddl/type.rb', line 4 def parent @parent end |
Instance Method Details
#inspect ⇒ Object
17 18 19 |
# File 'lib/longjing/pddl/type.rb', line 17 def inspect "(type #{to_s})" end |
#to_s ⇒ Object
13 14 15 |
# File 'lib/longjing/pddl/type.rb', line 13 def to_s @parent ? "#{@name} - #{@parent}" : @name.to_s end |