Class: Maglev::KnowledgeConfig::Relation

Inherits:
Struct
  • Object
show all
Defined in:
lib/maglev/knowledge_config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#depthObject

Returns the value of attribute depth

Returns:

  • (Object)

    the current value of depth



7
8
9
# File 'lib/maglev/knowledge_config.rb', line 7

def depth
  @depth
end

#inverseObject

Returns the value of attribute inverse

Returns:

  • (Object)

    the current value of inverse



7
8
9
# File 'lib/maglev/knowledge_config.rb', line 7

def inverse
  @inverse
end

#limitObject

Returns the value of attribute limit

Returns:

  • (Object)

    the current value of limit



7
8
9
# File 'lib/maglev/knowledge_config.rb', line 7

def limit
  @limit
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



7
8
9
# File 'lib/maglev/knowledge_config.rb', line 7

def name
  @name
end