Class: VivlioStarter::CLI::Metrics::BasicStats

Inherits:
Data
  • Object
show all
Defined in:
lib/vivlio_starter/cli/metrics/analyzer.rb

Overview

基本統計情報を保持するイミュータブルデータ。 chars / chars_no_newline は生の分量。code_chars / notation_chars は全空白を 除いた内訳で、本文(VocabularyStats#total_char_count)と足すと 「生から全空白を除いた長さ」に一致する。

Instance Attribute Summary collapse

Instance Attribute Details

#avg_clause_lenObject (readonly)

Returns the value of attribute avg_clause_len

Returns:

  • (Object)

    the current value of avg_clause_len



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def avg_clause_len
  @avg_clause_len
end

#avg_sentence_lenObject (readonly)

Returns the value of attribute avg_sentence_len

Returns:

  • (Object)

    the current value of avg_sentence_len



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def avg_sentence_len
  @avg_sentence_len
end

#charsObject (readonly)

Returns the value of attribute chars

Returns:

  • (Object)

    the current value of chars



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def chars
  @chars
end

#chars_no_newlineObject (readonly)

Returns the value of attribute chars_no_newline

Returns:

  • (Object)

    the current value of chars_no_newline



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def chars_no_newline
  @chars_no_newline
end

#clausesObject (readonly)

Returns the value of attribute clauses

Returns:

  • (Object)

    the current value of clauses



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def clauses
  @clauses
end

#code_charsObject (readonly)

Returns the value of attribute code_chars

Returns:

  • (Object)

    the current value of code_chars



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def code_chars
  @code_chars
end

#commasObject (readonly)

Returns the value of attribute commas

Returns:

  • (Object)

    the current value of commas



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def commas
  @commas
end

#linesObject (readonly)

Returns the value of attribute lines

Returns:

  • (Object)

    the current value of lines



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def lines
  @lines
end

#notation_charsObject (readonly)

Returns the value of attribute notation_chars

Returns:

  • (Object)

    the current value of notation_chars



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def notation_chars
  @notation_chars
end

#sentencesObject (readonly)

Returns the value of attribute sentences

Returns:

  • (Object)

    the current value of sentences



34
35
36
# File 'lib/vivlio_starter/cli/metrics/analyzer.rb', line 34

def sentences
  @sentences
end