Class: ArchSpec::Edge

Inherits:
Data
  • Object
show all
Defined in:
lib/archspec/model.rb

Constant Summary collapse

VERBS =
{
  references_constant: 'references',
  inherits_from: 'inherits from',
  includes: 'includes',
  prepends: 'prepends',
  extends: 'extends',
  calls_named_method: 'calls',
  instantiates_and_invokes: 'instantiates and invokes',
  requires: 'requires',
  requires_relative: 'requires',
  dynamic_feature: 'uses dynamic feature'
}.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#confidenceObject (readonly)

Returns the value of attribute confidence

Returns:

  • (Object)

    the current value of confidence



129
130
131
# File 'lib/archspec/model.rb', line 129

def confidence
  @confidence
end

#from_constantObject (readonly)

Returns the value of attribute from_constant

Returns:

  • (Object)

    the current value of from_constant



129
130
131
# File 'lib/archspec/model.rb', line 129

def from_constant
  @from_constant
end

#from_pathObject (readonly)

Returns the value of attribute from_path

Returns:

  • (Object)

    the current value of from_path



129
130
131
# File 'lib/archspec/model.rb', line 129

def from_path
  @from_path
end

#lexical_nestingObject (readonly)

Returns the value of attribute lexical_nesting

Returns:

  • (Object)

    the current value of lexical_nesting



129
130
131
# File 'lib/archspec/model.rb', line 129

def lexical_nesting
  @lexical_nesting
end

#locationObject (readonly)

Returns the value of attribute location

Returns:

  • (Object)

    the current value of location



129
130
131
# File 'lib/archspec/model.rb', line 129

def location
  @location
end

#receiverObject (readonly)

Returns the value of attribute receiver

Returns:

  • (Object)

    the current value of receiver



129
130
131
# File 'lib/archspec/model.rb', line 129

def receiver
  @receiver
end

#receiver_scopeObject (readonly)

Returns the value of attribute receiver_scope

Returns:

  • (Object)

    the current value of receiver_scope



129
130
131
# File 'lib/archspec/model.rb', line 129

def receiver_scope
  @receiver_scope
end

#resolved_methodObject (readonly)

Returns the value of attribute resolved_method

Returns:

  • (Object)

    the current value of resolved_method



129
130
131
# File 'lib/archspec/model.rb', line 129

def resolved_method
  @resolved_method
end

#resolved_receiverObject (readonly)

Returns the value of attribute resolved_receiver

Returns:

  • (Object)

    the current value of resolved_receiver



129
130
131
# File 'lib/archspec/model.rb', line 129

def resolved_receiver
  @resolved_receiver
end

#resolved_toObject (readonly)

Returns the value of attribute resolved_to

Returns:

  • (Object)

    the current value of resolved_to



129
130
131
# File 'lib/archspec/model.rb', line 129

def resolved_to
  @resolved_to
end

#toObject (readonly)

Returns the value of attribute to

Returns:

  • (Object)

    the current value of to



129
130
131
# File 'lib/archspec/model.rb', line 129

def to
  @to
end

#typeObject (readonly)

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



129
130
131
# File 'lib/archspec/model.rb', line 129

def type
  @type
end

Instance Method Details

#verbObject

The edge type as prose, for diagnostics and explain output.



157
158
159
# File 'lib/archspec/model.rb', line 157

def verb
  VERBS.fetch(type, type.to_s.tr('_', ' '))
end