Class: AppMap::Feature::Cls
- Inherits:
-
Base
- Object
- Struct
- FeatureStruct
- Base
- AppMap::Feature::Cls
- Defined in:
- lib/appmap/feature.rb
Overview
Cls is a feature which represents a code class. A class defines a namespace which contains other features (such as member classes and functions), and it also usually encapsulates some data on which the member features operate.
Instance Attribute Summary
Attributes inherited from Base
Attributes inherited from FeatureStruct
Instance Method Summary collapse
-
#prune? ⇒ Boolean
prune a class if it’s empty.
- #type? ⇒ Boolean
-
#type_name ⇒ Object
Gets the type name of this class as an array.
Methods inherited from Base
#add_child, #collect_functions, #enclosing_type_name, #enclosing_type_name?, expand_path, #include_option, #initialize, #prune, #remove_child, #reparent, #to_h, #to_json, #valid?
Constructor Details
This class inherits a constructor from AppMap::Feature::Base
Instance Method Details
#prune? ⇒ Boolean
prune a class if it’s empty.
209 210 211 |
# File 'lib/appmap/feature.rb', line 209 def prune? children.empty? end |
#type? ⇒ Boolean
213 214 215 |
# File 'lib/appmap/feature.rb', line 213 def type? true end |
#type_name ⇒ Object
Gets the type name of this class as an array.
218 219 220 |
# File 'lib/appmap/feature.rb', line 218 def type_name @type_name ||= enclosing_type_name + [ name ] end |