module

Tokei::Api::Services::LanguageStatsService

Shared: extract language statistics from tokei JSON result

Class methods

extract_basic(result : JSON::Any) : Hash(String, Hash(String, Int32))

Basic stats (files/code/comments/blanks) { "Lang" => {"files"=>Int32, "code"=>Int32, "comments"=>Int32, "blanks"=>Int32} }

Source
extract_with_percentage(result : JSON::Any) : Hash(String, Hash(String, Int32 | Float64))

Basic stats + percentage (%) { "Lang" => {"files"=>Int32, "code"=>Int32, "comments"=>Int32, "blanks"=>Int32, "percentage"=>Float64} }

Source