Class: Necropsy::DefinitionIndex::Lookup

Inherits:
Data
  • Object
show all
Defined in:
lib/necropsy/graph/definition_index.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#definitionsObject (readonly)

Returns the value of attribute definitions

Returns:

  • (Object)

    the current value of definitions



7
8
9
# File 'lib/necropsy/graph/definition_index.rb', line 7

def definitions
  @definitions
end

#identifierObject (readonly)

Returns the value of attribute identifier

Returns:

  • (Object)

    the current value of identifier



7
8
9
# File 'lib/necropsy/graph/definition_index.rb', line 7

def identifier
  @identifier
end

#statusObject (readonly)

Returns the value of attribute status

Returns:

  • (Object)

    the current value of status



7
8
9
# File 'lib/necropsy/graph/definition_index.rb', line 7

def status
  @status
end

Instance Method Details

#ambiguous?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/necropsy/graph/definition_index.rb', line 16

def ambiguous?
  status == :ambiguous
end

#exact?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/necropsy/graph/definition_index.rb', line 8

def exact?
  status == :exact
end

#missing?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/necropsy/graph/definition_index.rb', line 20

def missing?
  status == :missing
end

#nodeObject



24
25
26
# File 'lib/necropsy/graph/definition_index.rb', line 24

def node
  definitions.first if exact? || unique?
end

#unique?Boolean

Returns:

  • (Boolean)


12
13
14
# File 'lib/necropsy/graph/definition_index.rb', line 12

def unique?
  status == :unique
end