Class: VSM::Meta::Tools::SummarizeSelf
- Inherits:
-
Base
- Object
- ToolCapsule
- Base
- VSM::Meta::Tools::SummarizeSelf
- Defined in:
- lib/vsm/meta/tools.rb
Instance Attribute Summary
Attributes inherited from Base
#draft_store, #root, #snapshot_cache
Attributes inherited from ToolCapsule
Instance Method Summary collapse
Methods inherited from Base
Methods included from ActsAsTool
Constructor Details
This class inherits a constructor from VSM::Meta::Tools::Base
Instance Method Details
#run(_args) ⇒ Object
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 |
# File 'lib/vsm/meta/tools.rb', line 135 def run(_args) data = snapshot tools = flatten_tools(data, []).select { _1[:kind] == "tool" } { capsule: { name: data[:name], path: data[:path], class: data[:class], roles: roles_summary(data[:roles]) }, stats: { total_tools: tools.size, tool_names: tools.map { _1.dig(:tool, :name) } }, snapshot: data } end |