Class: Maglev::KnowledgeConfig::Relation
- Inherits:
-
Struct
- Object
- Struct
- Maglev::KnowledgeConfig::Relation
- Defined in:
- lib/maglev/knowledge_config.rb
Instance Attribute Summary collapse
-
#depth ⇒ Object
Returns the value of attribute depth.
-
#inverse ⇒ Object
Returns the value of attribute inverse.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(name:, depth:, limit:, inverse: nil) ⇒ Relation
constructor
A new instance of Relation.
Constructor Details
#initialize(name:, depth:, limit:, inverse: nil) ⇒ Relation
Returns a new instance of Relation.
8 9 10 11 |
# File 'lib/maglev/knowledge_config.rb', line 8 def initialize(name:, depth:, limit:, inverse: nil) super(name.to_s, depth, limit, inverse&.to_s) freeze end |
Instance Attribute Details
#depth ⇒ Object
Returns the value of attribute depth
7 8 9 |
# File 'lib/maglev/knowledge_config.rb', line 7 def depth @depth end |
#inverse ⇒ Object
Returns the value of attribute inverse
7 8 9 |
# File 'lib/maglev/knowledge_config.rb', line 7 def inverse @inverse end |
#limit ⇒ Object
Returns the value of attribute limit
7 8 9 |
# File 'lib/maglev/knowledge_config.rb', line 7 def limit @limit end |
#name ⇒ Object
Returns the value of attribute name
7 8 9 |
# File 'lib/maglev/knowledge_config.rb', line 7 def name @name end |