Class: Holistic::Ruby::Reference::Record

Inherits:
Database::Node show all
Defined in:
lib/holistic/ruby/reference/record.rb

Instance Attribute Summary

Attributes inherited from Database::Node

#__database__, #attributes, #relations

Instance Method Summary collapse

Methods inherited from Database::Node

#attr, #has_many, #has_one, #initialize, #relation

Constructor Details

This class inherits a constructor from Holistic::Database::Node

Instance Method Details

#cluesObject



6
# File 'lib/holistic/ruby/reference/record.rb', line 6

def clues      = attr(:clues)

#find_clue(clue_kind) ⇒ Object



12
13
14
# File 'lib/holistic/ruby/reference/record.rb', line 12

def find_clue(clue_kind)
  clues.find { |clue| clue.is_a?(clue_kind) }
end

#identifierObject



5
# File 'lib/holistic/ruby/reference/record.rb', line 5

def identifier = attr(:identifier)

#inspectObject



16
17
18
# File 'lib/holistic/ruby/reference/record.rb', line 16

def inspect
  "<#{self.class.name} clues=[#{clues}] referenced_scope=#{referenced_scope&.fully_qualified_name}>"
end

#located_in_scopeObject



10
# File 'lib/holistic/ruby/reference/record.rb', line 10

def located_in_scope = has_one(:located_in_scope)

#locationObject



7
# File 'lib/holistic/ruby/reference/record.rb', line 7

def location   = attr(:location)

#referenced_scopeObject



9
# File 'lib/holistic/ruby/reference/record.rb', line 9

def referenced_scope = has_one(:referenced_scope)