Class: CodeRay::Encoders::Statistic
- Inherits:
-
Encoder
- Object
- Encoder
- CodeRay::Encoders::Statistic
- Includes:
- CodeRay::Streamable
- Defined in:
- vendor/plugins/coderay-0.9.2/lib/coderay/encoders/statistic.rb
Overview
Makes a statistic for the given tokens.
Defined Under Namespace
Classes: TypeStats
Constant Summary
- STATS =
"\nCode Statistics\n\nTokens %8d\nNon-Whitespace %8d\nBytes Total %8d\n\nToken Types (%d):\ntype count ratio size (average)\n-------------------------------------------------------------\n%s\n"
- TOKEN_TYPES_ROW =
space 12007 33.81 % 1.7
"%-20s %8d %6.2f %% %5.1f\n"
Constants inherited from Encoder
Instance Attribute Summary
-
- (Object) real_token_count
readonly
Returns the value of attribute real_token_count.
-
- (Object) type_stats
readonly
Returns the value of attribute type_stats.
Method Summary
Methods inherited from Encoder
const_missing, #encode, #encode_stream, #encode_tokens, #file_extension, #initialize, streamable?, #to_proc
Methods included from CodeRay::Plugin
#helper, #included, #plugin_host, #plugin_id, #register_for, #title
Constructor Details
This class inherits a constructor from CodeRay::Encoders::Encoder
Instance Attribute Details
- (Object) real_token_count (readonly)
Returns the value of attribute real_token_count
10 11 12 |
# File 'vendor/plugins/coderay-0.9.2/lib/coderay/encoders/statistic.rb', line 10 def real_token_count @real_token_count end |
- (Object) type_stats (readonly)
Returns the value of attribute type_stats
10 11 12 |
# File 'vendor/plugins/coderay-0.9.2/lib/coderay/encoders/statistic.rb', line 10 def type_stats @type_stats end |