Class: ArchUnit::Metrics::Extraction::MethodInfo

Inherits:
Data
  • Object
show all
Defined in:
lib/archunit/metrics/extraction/metric_info.rb

Overview

One method and the instance fields it reads or writes.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, accessed_fields: []) ⇒ MethodInfo

Returns a new instance of MethodInfo.



54
55
56
57
58
# File 'lib/archunit/metrics/extraction/metric_info.rb', line 54

def initialize(name:, accessed_fields: [])
  name = immutable_string(name, :name)
  accessed_fields = immutable_names(accessed_fields, :accessed_fields)
  super
end

Instance Attribute Details

#accessed_fieldsObject (readonly)

Returns the value of attribute accessed_fields

Returns:

  • (Object)

    the current value of accessed_fields



51
52
53
# File 'lib/archunit/metrics/extraction/metric_info.rb', line 51

def accessed_fields
  @accessed_fields
end

#nameObject (readonly)

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



51
52
53
# File 'lib/archunit/metrics/extraction/metric_info.rb', line 51

def name
  @name
end