Class: Ashikawa::Core::Figure
- Inherits:
-
Object
- Object
- Ashikawa::Core::Figure
- Defined in:
- lib/ashikawa-core/figure.rb
Overview
Wrapper around figures of a collection
Instance Method Summary collapse
-
#alive_count ⇒ Object
The number of living documents.
-
#alive_size ⇒ Object
The total size in bytes used by all living documents.
-
#attributes_count ⇒ Object
Number of different attributes that are or have been used in the collection.
-
#datafiles_count ⇒ Object
The number of active datafiles.
-
#datafiles_file_size ⇒ Object
The file size of datafiles.
-
#dead_count ⇒ Object
The number of dead documents.
-
#dead_deletion ⇒ Object
The number of deletion markers.
-
#dead_size ⇒ Object
The total size in bytes used by all dead documents.
-
#initialize(raw_figure) ⇒ Figure
constructor
Create a wrapper around given figures.
-
#journals_count ⇒ Object
The number of journals.
-
#journals_file_size ⇒ Object
The file size of journals.
-
#shapes_count ⇒ Object
The total number of shapes used in the collection.
Constructor Details
#initialize(raw_figure) ⇒ Figure
Create a wrapper around given figures
12 13 14 15 16 17 18 19 |
# File 'lib/ashikawa-core/figure.rb', line 12 def initialize(raw_figure) @datafiles = raw_figure['datafiles'] @alive = raw_figure['alive'] @dead = raw_figure['dead'] @shapes = raw_figure['shapes'] @journals = raw_figure['journals'] @attributes = raw_figure['attributes'] end |
Instance Method Details
#alive_count ⇒ Object
The number of living documents
61 62 63 |
# File 'lib/ashikawa-core/figure.rb', line 61 def alive_count @alive['count'] end |
#alive_size ⇒ Object
The total size in bytes used by all living documents
50 51 52 |
# File 'lib/ashikawa-core/figure.rb', line 50 def alive_size @alive['size'] end |
#attributes_count ⇒ Object
Number of different attributes that are or have been used in the collection
138 139 140 |
# File 'lib/ashikawa-core/figure.rb', line 138 def attributes_count @attributes['count'] end |
#datafiles_count ⇒ Object
The number of active datafiles
28 29 30 |
# File 'lib/ashikawa-core/figure.rb', line 28 def datafiles_count @datafiles['count'] end |
#datafiles_file_size ⇒ Object
The file size of datafiles
39 40 41 |
# File 'lib/ashikawa-core/figure.rb', line 39 def datafiles_file_size @datafiles['fileSize'] end |
#dead_count ⇒ Object
The number of dead documents
83 84 85 |
# File 'lib/ashikawa-core/figure.rb', line 83 def dead_count @dead['count'] end |
#dead_deletion ⇒ Object
The number of deletion markers
105 106 107 |
# File 'lib/ashikawa-core/figure.rb', line 105 def dead_deletion @dead['deletion'] end |
#dead_size ⇒ Object
The total size in bytes used by all dead documents
72 73 74 |
# File 'lib/ashikawa-core/figure.rb', line 72 def dead_size @dead['size'] end |
#journals_count ⇒ Object
The number of journals
116 117 118 |
# File 'lib/ashikawa-core/figure.rb', line 116 def journals_count @journals['count'] end |
#journals_file_size ⇒ Object
The file size of journals
127 128 129 |
# File 'lib/ashikawa-core/figure.rb', line 127 def journals_file_size @journals['fileSize'] end |
#shapes_count ⇒ Object
The total number of shapes used in the collection
94 95 96 |
# File 'lib/ashikawa-core/figure.rb', line 94 def shapes_count @shapes['count'] end |