Class: YARD::CLI::Stats
- Inherits:
-
Object
- Object
- YARD::CLI::Stats
- Defined in:
- lib/yard-go/extensions.rb
Instance Method Summary collapse
- #stats_for_fields ⇒ Object
- #stats_for_interfaces ⇒ Object
- #stats_for_packages ⇒ Object
- #stats_for_structs ⇒ Object
Instance Method Details
#stats_for_fields ⇒ Object
34 35 36 |
# File 'lib/yard-go/extensions.rb', line 34 def stats_for_fields output "Fields", *type_statistics(:field) end |
#stats_for_interfaces ⇒ Object
30 31 32 |
# File 'lib/yard-go/extensions.rb', line 30 def stats_for_interfaces output "Interfaces", *type_statistics(:interface) end |
#stats_for_packages ⇒ Object
19 20 21 |
# File 'lib/yard-go/extensions.rb', line 19 def stats_for_packages output "Packages", *type_statistics(:package) end |
#stats_for_structs ⇒ Object
23 24 25 26 27 28 |
# File 'lib/yard-go/extensions.rb', line 23 def stats_for_structs struct_stats = type_statistics(:struct) bstruct_stats = type_statistics(:bare_struct) stats = struct_stats.zip(bstruct_stats).map {|o| o.reduce(:+) } output "Structs", *stats end |