Class: Rigor::ModuleGraph::Stats::NamespaceMetrics
- Inherits:
-
Data
- Object
- Data
- Rigor::ModuleGraph::Stats::NamespaceMetrics
- Defined in:
- lib/rigor/module_graph/stats.rb
Overview
The five numbers for one namespace, exposed as a Data value so callers can treat the result like a row of a table.
Instance Attribute Summary collapse
-
#fan_in ⇒ Object
readonly
Returns the value of attribute fan_in.
-
#fan_out ⇒ Object
readonly
Returns the value of attribute fan_out.
-
#internal ⇒ Object
readonly
Returns the value of attribute internal.
-
#namespace ⇒ Object
readonly
Returns the value of attribute namespace.
-
#nodes ⇒ Object
readonly
Returns the value of attribute nodes.
Instance Method Summary collapse
- #to_h ⇒ Object
-
#total ⇒ Object
Sum of edges originating in the namespace (fan_out + internal).
Instance Attribute Details
#fan_in ⇒ Object (readonly)
Returns the value of attribute fan_in
99 100 101 |
# File 'lib/rigor/module_graph/stats.rb', line 99 def fan_in @fan_in end |
#fan_out ⇒ Object (readonly)
Returns the value of attribute fan_out
99 100 101 |
# File 'lib/rigor/module_graph/stats.rb', line 99 def fan_out @fan_out end |
#internal ⇒ Object (readonly)
Returns the value of attribute internal
99 100 101 |
# File 'lib/rigor/module_graph/stats.rb', line 99 def internal @internal end |
#namespace ⇒ Object (readonly)
Returns the value of attribute namespace
99 100 101 |
# File 'lib/rigor/module_graph/stats.rb', line 99 def namespace @namespace end |
#nodes ⇒ Object (readonly)
Returns the value of attribute nodes
99 100 101 |
# File 'lib/rigor/module_graph/stats.rb', line 99 def nodes @nodes end |
Instance Method Details
#to_h ⇒ Object
106 107 108 109 110 111 112 113 114 115 |
# File 'lib/rigor/module_graph/stats.rb', line 106 def to_h { "namespace" => namespace, "nodes" => nodes, "fan_out" => fan_out, "fan_in" => fan_in, "internal" => internal, "total" => total } end |
#total ⇒ Object
Sum of edges originating in the namespace (fan_out + internal).
102 103 104 |
# File 'lib/rigor/module_graph/stats.rb', line 102 def total fan_out + internal end |