xlsxrb 0.1.11 → 0.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.mutant.yml +8 -0
- data/CHANGELOG.md +35 -0
- data/README.md +1 -0
- data/Rakefile +66 -0
- data/docs/ARCHITECTURE.md +1 -1
- data/docs/DEVELOPMENT.md +6 -2
- data/docs/MUTATION_TESTING.md +52 -0
- data/docs/QUALITY_ASSURANCE.md +1 -0
- data/docs/visual/VisualGallery.md +38 -27
- data/docs/wasm/ruby.wasm +0 -0
- data/lib/xlsxrb/chart_builder.rb +18 -18
- data/lib/xlsxrb/dsl_helpers.rb +116 -0
- data/lib/xlsxrb/elements/cell.rb +56 -22
- data/lib/xlsxrb/elements/column.rb +27 -3
- data/lib/xlsxrb/elements/row.rb +27 -8
- data/lib/xlsxrb/elements/workbook.rb +16 -14
- data/lib/xlsxrb/elements/worksheet.rb +17 -1
- data/lib/xlsxrb/ooxml/cfb.rb +9 -6
- data/lib/xlsxrb/ooxml/crypto/agile.rb +5 -5
- data/lib/xlsxrb/ooxml/reader/listeners/core_listeners.rb +784 -0
- data/lib/xlsxrb/ooxml/reader/listeners/drawing_listeners.rb +3478 -0
- data/lib/xlsxrb/ooxml/reader/listeners/feature_listeners.rb +1796 -0
- data/lib/xlsxrb/ooxml/reader/listeners/style_listeners.rb +428 -0
- data/lib/xlsxrb/ooxml/reader/listeners.rb +4 -6446
- data/lib/xlsxrb/ooxml/utils.rb +5 -6
- data/lib/xlsxrb/ooxml/writer/drawing_xml.rb +1602 -0
- data/lib/xlsxrb/ooxml/writer/features_xml.rb +731 -0
- data/lib/xlsxrb/ooxml/writer/styles_xml.rb +348 -0
- data/lib/xlsxrb/ooxml/writer.rb +7 -2645
- data/lib/xlsxrb/ooxml/xml_builder.rb +11 -2
- data/lib/xlsxrb/ooxml/zip_generator.rb +26 -5
- data/lib/xlsxrb/stream_writer.rb +15 -49
- data/lib/xlsxrb/style_builder.rb +10 -1
- data/lib/xlsxrb/version.rb +1 -1
- data/lib/xlsxrb/worksheet_builder.rb +16 -50
- data/lib/xlsxrb.rb +1 -0
- data/sig/generated/xlsxrb/chart_builder.rbs +36 -36
- data/sig/generated/xlsxrb/dsl_helpers.rbs +60 -0
- data/sig/generated/xlsxrb/elements/cell.rbs +29 -0
- data/sig/generated/xlsxrb/elements/column.rbs +32 -21
- data/sig/generated/xlsxrb/elements/row.rbs +94 -14
- data/sig/generated/xlsxrb/elements/workbook.rbs +95 -10
- data/sig/generated/xlsxrb/elements/worksheet.rbs +9 -0
- data/sig/generated/xlsxrb/ooxml/reader/listeners/core_listeners.rbs +173 -0
- data/sig/generated/xlsxrb/ooxml/reader/listeners/drawing_listeners.rbs +400 -0
- data/sig/generated/xlsxrb/ooxml/reader/listeners/feature_listeners.rbs +442 -0
- data/sig/generated/xlsxrb/ooxml/reader/listeners/style_listeners.rbs +80 -0
- data/sig/generated/xlsxrb/ooxml/reader/listeners.rbs +0 -1072
- data/sig/generated/xlsxrb/ooxml/utils.rbs +2 -0
- data/sig/generated/xlsxrb/ooxml/writer/drawing_xml.rbs +79 -0
- data/sig/generated/xlsxrb/ooxml/writer/features_xml.rbs +83 -0
- data/sig/generated/xlsxrb/ooxml/writer/styles_xml.rbs +53 -0
- data/sig/generated/xlsxrb/ooxml/writer.rbs +6 -185
- data/sig/generated/xlsxrb/ooxml/xml_builder.rbs +7 -0
- data/sig/generated/xlsxrb/ooxml/zip_generator.rbs +15 -0
- data/sig/generated/xlsxrb/style_builder.rbs +7 -0
- metadata +19 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 15a818d0e9e58b9ada1a11c90db9f9baa55fc76b3a7e62303d33a61f2e6f9896
|
|
4
|
+
data.tar.gz: c7b5f4af516d9911a1ee37ef5413939e8425bc270304900132e0962fad18905d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9deec47109a21a62aafb4a93efcee64f61f5ffb4566fd009cd1d5fdb9557e1193a53155d60ff7e4cc565317d49fb4ce8b3b89542234dff6a900981cd9220d14a
|
|
7
|
+
data.tar.gz: b536ef03e3ae01c49ff8e00c693d86fb72a9248cae1ccf93802962127d9b86ef676b5b17ca4b896613961bab8869139644e439542b1bca5adb6a7452d971f124
|
data/.mutant.yml
ADDED
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,38 @@
|
|
|
1
|
+
## [0.1.12] - 2026-09-20
|
|
2
|
+
|
|
3
|
+
### Added
|
|
4
|
+
- **Mutation Testing Framework (`mutant`)**:
|
|
5
|
+
- Full-scale integration of mutant test suite targeting the Functional Core (10 classes and modules, 38 subjects).
|
|
6
|
+
- Achieved **100.00% Kill Rate (1,091 / 1,091 mutations killed, 0 alive)** without exclusions.
|
|
7
|
+
- Added dedicated root configuration [`.mutant.yml`](.mutant.yml) for streamlined CLI execution (`bundle exec mutant run -- '...'`).
|
|
8
|
+
- Integrated `bundle exec rake mutant:pure` into GitHub Actions CI pipeline (`main.yml`), guaranteeing mutation-tested quality on every push and pull request.
|
|
9
|
+
- Added comprehensive architecture and testing guide in [`docs/MUTATION_TESTING.md`](docs/MUTATION_TESTING.md).
|
|
10
|
+
- **Pre-Push Quality Verification Script (`bin/pre-push`)**: Added automated pre-push verification script running RuboCop, Steep type checking, RBS sync validation, Unit & Contract tests, RBS runtime type validation, and pure logic mutation testing, with automatic hook installation in `bin/setup`.
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- **Functional Core & Imperative Shell Architecture**:
|
|
14
|
+
- Purified core business logic and domain entities into deterministic, side-effect-free class methods and predicates:
|
|
15
|
+
- Extracted coordinate and validation predicates: `Elements::Cell.valid_value?`, `Cell.valid_coordinates?`, `Cell.calculate_column_letter`, `Cell.calculate_column_index`.
|
|
16
|
+
- Extracted domain validation predicates: `Elements::Row.valid_index?`, `Elements::Column.valid_index?`, `Elements::Worksheet.valid_name?`.
|
|
17
|
+
- Replaced date/time serial calculations in `Ooxml::Utils` with pure mathematical conversions (Julian Day math for `date_to_serial`, `divmod` arithmetic for `serial_to_datetime`, and rigorous 1900 leap year bug handling).
|
|
18
|
+
- Extracted binary packing utilities in `Ooxml::ZipGenerator` (`le16`, `le32`, and bitfield arithmetic for `dos_datetime`).
|
|
19
|
+
- Extracted pure XML character escaping logic in `Ooxml::XmlBuilder.escape`.
|
|
20
|
+
- Modularized `Ooxml::Writer` into domain-specific mixin modules (`DrawingXml`, `FeaturesXml`, `StylesXml`).
|
|
21
|
+
- Extracted shared DSL parameter normalization and range expansion into `Xlsxrb::DslHelpers`.
|
|
22
|
+
- Modularized reader SAX listeners into domain-specific parser components.
|
|
23
|
+
|
|
24
|
+
### Fixed
|
|
25
|
+
- **Boundary Validation & Error Reporting**:
|
|
26
|
+
- Strictly validate row number digits in `Elements::Cell.parse_ref` to reject malformed cell coordinate strings (e.g. `A0`, `A01`).
|
|
27
|
+
- Harmonized supported value type checks and nil/empty handling across `Elements::Cell.validate`.
|
|
28
|
+
- Corrected maximum row index boundary error messages in `Elements::Row.validate`.
|
|
29
|
+
- Hardened cryptographic stream boundary checks and corrupted header handling in Standard and Agile encryption modes.
|
|
30
|
+
- **RBS Runtime Type Validation**:
|
|
31
|
+
- Expanded `Elements::Workbook#initialize`, `#sheet`, and `[]` type annotations to accept `StreamSheet` instances used by streaming readers.
|
|
32
|
+
- Made update block parameter optional in `Elements::Workbook#update_sheet` to allow testing missing block validation.
|
|
33
|
+
- Supported `Numeric` types (Float and Integer) in `ChartBuilder` and `SeriesBuilder` kwargs (`width`, etc.).
|
|
34
|
+
- Handled `RBS::Test::Tester::TypeError` in unit tests verifying block return type validation.
|
|
35
|
+
|
|
1
36
|
## [0.1.11] - 2026-08-19
|
|
2
37
|
|
|
3
38
|
### Performance
|
data/README.md
CHANGED
|
@@ -166,6 +166,7 @@ Backed by an enterprise-grade QA architecture to guarantee absolute reliability:
|
|
|
166
166
|
* **Official Microsoft Open XML SDK Validation**: Validates generated OOXML structures against Microsoft's official SDK.
|
|
167
167
|
* **Visual Regression Testing (VRT)**: Headless LibreOffice Calc pixel-by-pixel rendering checks.
|
|
168
168
|
* **Contract & Round-Trip Tests**: Verifies parity between Streaming and In-Memory APIs and round-trip read/write accuracy.
|
|
169
|
+
* **Mutation Testing (Mutant)**: 100% mutant kill rate (1,091/1,091 mutations across 38 subjects) on pure algorithms, predicates, and coordinates ([docs/MUTATION_TESTING.md](docs/MUTATION_TESTING.md)).
|
|
169
170
|
* **Security & DoS Protection**: Formula injection mitigation and ZIP bomb protection.
|
|
170
171
|
|
|
171
172
|
For full architectural details, see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) and [docs/QUALITY_ASSURANCE.md](docs/QUALITY_ASSURANCE.md).
|
data/Rakefile
CHANGED
|
@@ -462,6 +462,12 @@ task doc: %i[wasm fetch_assets] do
|
|
|
462
462
|
FileUtils.mkdir_p("doc/docs/visual/files")
|
|
463
463
|
FileUtils.cp_r(Dir.glob("docs/visual/files/*"), "doc/docs/visual/files")
|
|
464
464
|
|
|
465
|
+
FileUtils.mkdir_p("doc/docs/assets")
|
|
466
|
+
FileUtils.cp_r(Dir.glob("docs/assets/*"), "doc/docs/assets")
|
|
467
|
+
|
|
468
|
+
# Alias index.html as README_md.html for links referencing README.md
|
|
469
|
+
FileUtils.cp("doc/index.html", "doc/README_md.html") if File.exist?("doc/index.html")
|
|
470
|
+
|
|
465
471
|
# --- WebAssembly Playground Integration ---
|
|
466
472
|
puts "Integrating WebAssembly Playground..."
|
|
467
473
|
|
|
@@ -565,3 +571,63 @@ desc "Run static type checking with Steep"
|
|
|
565
571
|
task typecheck: :sig do
|
|
566
572
|
sh "bundle exec steep check"
|
|
567
573
|
end
|
|
574
|
+
|
|
575
|
+
namespace :mutant do
|
|
576
|
+
desc "Run mutation testing on pure logic and algorithms (coordinates, serial, conversion)"
|
|
577
|
+
task :pure do
|
|
578
|
+
default_subjects = [
|
|
579
|
+
"Xlsxrb::Elements::CoordinateAccess#cells",
|
|
580
|
+
"Xlsxrb::Elements::CoordinateAccess#[]",
|
|
581
|
+
"Xlsxrb::Elements::Cell#ref",
|
|
582
|
+
"Xlsxrb::Elements::Cell#to_i",
|
|
583
|
+
"Xlsxrb::Elements::Cell#to_f",
|
|
584
|
+
"Xlsxrb::Elements::Cell#content",
|
|
585
|
+
"Xlsxrb::Elements::Cell#to_s",
|
|
586
|
+
"Xlsxrb::Elements::Cell#valid?",
|
|
587
|
+
"Xlsxrb::Elements::Cell.calculate_column_letter",
|
|
588
|
+
"Xlsxrb::Elements::Cell.calculate_column_index",
|
|
589
|
+
"Xlsxrb::Elements::Cell.valid_coordinates?",
|
|
590
|
+
"Xlsxrb::Elements::Cell.valid_value?",
|
|
591
|
+
"Xlsxrb::Ooxml::Utils.serial_to_date",
|
|
592
|
+
"Xlsxrb::Ooxml::Utils.date_to_serial",
|
|
593
|
+
"Xlsxrb::Ooxml::Utils.datetime_to_serial",
|
|
594
|
+
"Xlsxrb::Ooxml::Utils.serial_to_datetime",
|
|
595
|
+
"Xlsxrb::Ooxml::ZipGenerator.le16",
|
|
596
|
+
"Xlsxrb::Ooxml::ZipGenerator.le32",
|
|
597
|
+
"Xlsxrb::StreamRow#valid?",
|
|
598
|
+
"Xlsxrb::StreamRow#unmapped_data",
|
|
599
|
+
"Xlsxrb::StreamRow#errors",
|
|
600
|
+
"Xlsxrb::StreamRow#values",
|
|
601
|
+
"Xlsxrb::Elements::Worksheet.valid_name?",
|
|
602
|
+
"Xlsxrb::Elements::Worksheet#valid?",
|
|
603
|
+
"Xlsxrb::Elements::Worksheet#load",
|
|
604
|
+
"Xlsxrb::Ooxml::Cfb::Reader.cfb?",
|
|
605
|
+
"Xlsxrb::Ooxml::Cfb::DirEntry#stream?",
|
|
606
|
+
"Xlsxrb::Ooxml::Cfb::DirEntry#root?",
|
|
607
|
+
"Xlsxrb::Ooxml::Cfb::DirEntry#storage?",
|
|
608
|
+
"Xlsxrb::Elements::Column.valid_index?",
|
|
609
|
+
"Xlsxrb::Elements::Column.validate",
|
|
610
|
+
"Xlsxrb::Elements::Column#valid?",
|
|
611
|
+
"Xlsxrb::Elements::Row.valid_index?",
|
|
612
|
+
"Xlsxrb::Elements::Row#valid?",
|
|
613
|
+
"Xlsxrb::Elements::Workbook#valid?",
|
|
614
|
+
"Xlsxrb::Ooxml::XmlBuilder.escape",
|
|
615
|
+
"Xlsxrb::Ooxml::ZipGenerator.dos_datetime",
|
|
616
|
+
"Xlsxrb::DslHelpers.normalize_column_indices"
|
|
617
|
+
].join(" ")
|
|
618
|
+
subjects = ENV["MUTANT_SUBJECTS"] || default_subjects
|
|
619
|
+
test_files = [
|
|
620
|
+
"./test/xlsxrb/elements_test.rb",
|
|
621
|
+
"./test/xlsxrb/ooxml_test.rb",
|
|
622
|
+
"./test/xlsxrb/ooxml/utils_test.rb",
|
|
623
|
+
"./test/xlsxrb/ooxml/crypto_test.rb",
|
|
624
|
+
"./test/xlsxrb/ooxml/cfb_test.rb",
|
|
625
|
+
"./test/zip_generator_test.rb",
|
|
626
|
+
"./test/xlsxrb/stream_row_test.rb",
|
|
627
|
+
"./test/xlsxrb/style_builder_test.rb",
|
|
628
|
+
"./test/xlsxrb/dsl_helpers_test.rb"
|
|
629
|
+
].select { |f| File.exist?(f) }
|
|
630
|
+
requires = test_files.map { |f| "-r #{f}" }.join(" ")
|
|
631
|
+
sh "bundle exec mutant run --usage opensource #{requires} -- #{subjects}"
|
|
632
|
+
end
|
|
633
|
+
end
|
data/docs/ARCHITECTURE.md
CHANGED
|
@@ -509,6 +509,6 @@ To ensure library robustness and consistency across execution paths, we organize
|
|
|
509
509
|
- Run via: `bundle exec rake test:e2e`
|
|
510
510
|
|
|
511
511
|
4. **Visual Examples & VRT (`test/visual/`):**
|
|
512
|
-
- **Living Documentation:** Compiles visual DSL scripts under `examples/visual/` into the [Visual Examples Gallery](visual/
|
|
512
|
+
- **Living Documentation:** Compiles visual DSL scripts under `examples/visual/` into the [Visual Examples Gallery](visual/VisualGallery.md).
|
|
513
513
|
- **Visual Regression Testing:** Renders the generated spreadsheets into PNG files using headless LibreOffice Calc, and calculates pixel differences against reference baselines using ImageMagick.
|
|
514
514
|
- Run via: `bundle exec rake test:visual`
|
data/docs/DEVELOPMENT.md
CHANGED
|
@@ -32,7 +32,11 @@ To run the different tiers of our testing strategy:
|
|
|
32
32
|
```bash
|
|
33
33
|
bundle exec rake test:visual
|
|
34
34
|
```
|
|
35
|
-
7. **
|
|
35
|
+
7. **Mutation Testing (Pure Logic & Algorithms):**
|
|
36
|
+
```bash
|
|
37
|
+
bundle exec rake mutant:pure
|
|
38
|
+
```
|
|
39
|
+
8. **Run All Tests:**
|
|
36
40
|
```bash
|
|
37
41
|
bundle exec rake test
|
|
38
42
|
```
|
|
@@ -41,7 +45,7 @@ To run the different tiers of our testing strategy:
|
|
|
41
45
|
|
|
42
46
|
## Development Workflow
|
|
43
47
|
|
|
44
|
-
High-level API expansion follows the Facade rules documented in [
|
|
48
|
+
High-level API expansion follows the Facade rules documented in [ARCHITECTURE.md](ARCHITECTURE.md). In short: if a low-level writer feature is stable, the default expectation is that it should eventually be exposed through the high-level DSL as well, with consistent naming, both streaming and in-memory coverage, backward-compatible options/block forms where practical, and matching Facade-level tests.
|
|
45
49
|
|
|
46
50
|
To ensure systematic progress, reliable round-trip compatibility, and strict adherence to the ECMA-376 specification, we follow this iterative development cycle for each new feature:
|
|
47
51
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Mutation Testing in xlsxrb
|
|
2
|
+
|
|
3
|
+
To ensure enterprise-grade reliability and avoid "shallow test coverage" (where line coverage is high but assertions are missing or weak), `xlsxrb` adopts **Mutation Testing** via [`mbj/mutant`](https://github.com/mbj/mutant) with `test-unit` integration.
|
|
4
|
+
|
|
5
|
+
As of the current release, the test suite achieves **100.00% kill rate (1,091 / 1,091 mutations killed, 0 alive)** across all 38 pure functional subjects.
|
|
6
|
+
|
|
7
|
+
## Motivation & Strategy
|
|
8
|
+
|
|
9
|
+
Standard code coverage measures whether lines of code were executed during tests. However, it cannot guarantee that the tests will fail if the code's behavior is altered or corrupted. Mutation testing systematically modifies source code (introducing "mutants" such as flipping conditionals, substituting constants, or removing statements) and checks whether existing tests catch the mutation ("kill" the mutant).
|
|
10
|
+
|
|
11
|
+
### Targeted Scope: Functional Core, Pure Predicates & Byte Encoding
|
|
12
|
+
|
|
13
|
+
Running mutation testing across the entire codebase (which includes heavy file I/O, ZIP streaming, and large XML parsing) is computationally expensive and prone to creating brittle tests for streaming writers. Therefore, `xlsxrb` follows the **Functional Core / Imperative Shell** architecture, focusing mutation testing strictly on pure functions, boundary predicates, coordinate conversions, and binary encoders:
|
|
14
|
+
|
|
15
|
+
1. **Coordinates & Cell Conversions (`Xlsxrb::Elements::Cell`, `CoordinateAccess`)**:
|
|
16
|
+
- Column letters to 0-based indices (`"A"` ↔ `0`, `"Z"` ↔ `25`, `"AA"` ↔ `26`, up to `"XFD"` ↔ `16383`).
|
|
17
|
+
- Pure predicate checks (`Cell.valid_coordinates?`, `Cell.valid_value?`, `Cell#valid?`).
|
|
18
|
+
- String, integer, and float conversions (`Cell#to_s`, `Cell#to_i`, `Cell#to_f`, `Cell#content`, `Cell#ref`).
|
|
19
|
+
- Coordinate access references and cell sorting (`CoordinateAccess#cells`, `CoordinateAccess#[]`).
|
|
20
|
+
2. **Worksheet, Column, Row & Workbook Invariants (`Xlsxrb::Elements::*`, `Xlsxrb::StreamRow`)**:
|
|
21
|
+
- Worksheet name validation (`Worksheet.valid_name?` with 1..31 characters and forbidden character rules `\ / ? * [ ]`).
|
|
22
|
+
- Column and row bounds (`Column.valid_index?`, `Column.validate`, `Column#valid?`, `Row.valid_index?`, `Row#valid?`).
|
|
23
|
+
- Workbook structure validation (`Workbook#valid?`).
|
|
24
|
+
- Streaming row data integrity (`StreamRow#valid?`, `StreamRow#unmapped_data`, `StreamRow#errors`, `StreamRow#values`).
|
|
25
|
+
3. **Serial Value & DateTime Conversions (`Xlsxrb::Ooxml::Utils`)**:
|
|
26
|
+
- Julian Day ↔ 1900-based serial number conversions (`date_to_serial`, `serial_to_date`).
|
|
27
|
+
- Time fractions and fractional days arithmetic (`datetime_to_serial`, `serial_to_datetime`).
|
|
28
|
+
- Excel 1900 leap year bug handling.
|
|
29
|
+
4. **Binary Parsing & Bitfield Packings (`Xlsxrb::Ooxml::ZipGenerator`, `Xlsxrb::Ooxml::Cfb`)**:
|
|
30
|
+
- Little-endian 16/32-bit byte serialization (`ZipGenerator.le16`, `ZipGenerator.le32`).
|
|
31
|
+
- MS-DOS packed datetime calculation with arithmetic bitfield combinations (`ZipGenerator.dos_datetime`).
|
|
32
|
+
- Compound File Binary (CFB) magic header recognition (`Cfb::Reader.cfb?`) and directory entry predicates (`DirEntry#stream?`, `#root?`, `#storage?`).
|
|
33
|
+
5. **XML Character Escaping (`Xlsxrb::Ooxml::XmlBuilder`)**:
|
|
34
|
+
- Pure escaping of XML special characters (`XmlBuilder.escape`) with object identity preservation for clean strings.
|
|
35
|
+
6. **DSL Normalization (`Xlsxrb::DslHelpers`)**:
|
|
36
|
+
- Column indices, range, and alphabet normalization (`DslHelpers.normalize_column_indices`).
|
|
37
|
+
|
|
38
|
+
### Excluded Scope (Non-Targets)
|
|
39
|
+
|
|
40
|
+
- **Streaming XML Writers & Parsers**: Validated via Microsoft Open XML SDK schema checks and round-trip parsing tests rather than mutant to avoid brittle assertions.
|
|
41
|
+
- **Visual Regression Testing (VRT)**: Headless rendering with LibreOffice Calc is validated via image diffs in CI.
|
|
42
|
+
- **Cryptographic Key Stretching**: Password hashing with 100,000 spin iterations is validated by specific contract tests to avoid slow feedback cycles.
|
|
43
|
+
|
|
44
|
+
## Running Mutation Testing
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Run full mutation testing suite (38 subjects, ~35 seconds)
|
|
48
|
+
bundle exec rake mutant:pure
|
|
49
|
+
|
|
50
|
+
# Or run mutant against a specific class or method using .mutant.yml configuration
|
|
51
|
+
bundle exec mutant run -- 'Xlsxrb::Elements::Cell.valid_value?'
|
|
52
|
+
```
|
data/docs/QUALITY_ASSURANCE.md
CHANGED
|
@@ -15,6 +15,7 @@ Below is an overview of the inspection mechanisms, when they run, the quality at
|
|
|
15
15
|
| **Unit & Contract Tests** | `rake test:unit test:contract` | ⭕ | ⭕ | - | Accuracy / Functional Reqs | Dynamic Analysis (Assertions) | Method specification violations, unexpected return values, edge-case failures. |
|
|
16
16
|
| **Runtime Type Validation (RBS::Test)** | `rake test:rbs` | △ (Opt-in) | ⭕ | - | Type Safety (Dynamic) | Dynamic Analysis (Runtime Hooks) | Type errors slipping past static checks, divergence between RBS docs and implementation. |
|
|
17
17
|
| **Property-Based Testing (PBT)** | `rake test:pbt` | ⭕ | ⭕ | - | Robustness / Exhaustiveness | Automated Random Generation | Crashes caused by "unexpected inputs" (e.g., empty strings, huge numbers, special symbols like `=`). |
|
|
18
|
+
| **Mutation Testing (Mutant)** | `rake mutant:pure` | ⭕ | ⭕ | - | Test Suite Rigor / Detection Power | Fault Injection / Mutation Analysis (100% kill on 1,091 mutants) | Shallow tests, unasserted edge cases, and surviving mutant bugs in pure algorithms, predicates, and coordinates logic. |
|
|
18
19
|
| **Security Validation (DoS Protection)** | Included in `rake test:unit` | ⭕ | ⭕ | - | Availability / Safety | Dynamic Analysis (Malicious Input) | Memory/disk exhaustion from ZIP bombs, infinite parsing loops from malformed files. |
|
|
19
20
|
| **Concurrency Validation (Thread/Ractor)** | Included in `rake test:unit` | ⭕ | ⭕ | - | Thread Safety | Dynamic Analysis (Parallel Execution) | Global variable pollution, data mixing during concurrent request processing. |
|
|
20
21
|
| **XSD Schema Validation** | Included in `rake test:unit` | ⭕ | ⭕ | - | Compatibility / Compliance | Structural Validation | "We found a problem with some content in it" errors when opening in Excel. |
|
|
@@ -1136,8 +1136,8 @@ end
|
|
|
1136
1136
|
```text
|
|
1137
1137
|
=== Read Validation ===
|
|
1138
1138
|
Row 0: A1: "Format" (Format ID: , Code: nil), B1: "Value" (Format ID: , Code: nil)
|
|
1139
|
-
Row 1: A2: "Positive Yen" (Format ID: , Code: nil), B2: 12500 (Format ID:
|
|
1140
|
-
Row 2: A3: "Negative Yen" (Format ID: , Code: nil), B3: -8000 (Format ID:
|
|
1139
|
+
Row 1: A2: "Positive Yen" (Format ID: , Code: nil), B2: 12500 (Format ID: 166, Code: "¥#,##0;[Red]¥-#,##0")
|
|
1140
|
+
Row 2: A3: "Negative Yen" (Format ID: , Code: nil), B3: -8000 (Format ID: 166, Code: "¥#,##0;[Red]¥-#,##0")
|
|
1141
1141
|
```
|
|
1142
1142
|
|
|
1143
1143
|
<hr/>
|
|
@@ -1187,8 +1187,8 @@ end
|
|
|
1187
1187
|
```text
|
|
1188
1188
|
=== Read Validation ===
|
|
1189
1189
|
Row 0: A1: "Format" (Format ID: , Code: nil), B1: "Value" (Format ID: , Code: nil)
|
|
1190
|
-
Row 1: A2: "Positive (Green)" (Format ID: , Code: nil), B2: 5000 (Format ID:
|
|
1191
|
-
Row 2: A3: "Negative (Red)" (Format ID: , Code: nil), B3: -2500 (Format ID:
|
|
1190
|
+
Row 1: A2: "Positive (Green)" (Format ID: , Code: nil), B2: 5000 (Format ID: 166, Code: "[Green]#,##0;[Red]-#,##0")
|
|
1191
|
+
Row 2: A3: "Negative (Red)" (Format ID: , Code: nil), B3: -2500 (Format ID: 166, Code: "[Green]#,##0;[Red]-#,##0")
|
|
1192
1192
|
```
|
|
1193
1193
|
|
|
1194
1194
|
<hr/>
|
|
@@ -1239,9 +1239,9 @@ end
|
|
|
1239
1239
|
```text
|
|
1240
1240
|
=== Read Validation ===
|
|
1241
1241
|
Row 0: A1: "Format" (Format ID: , Code: nil), B1: "Value" (Format ID: , Code: nil)
|
|
1242
|
-
Row 1: A2: "Half" (Format ID: , Code: nil), B2: 0.5 (Format ID:
|
|
1243
|
-
Row 2: A3: "Third" (Format ID: , Code: nil), B3: 0.3333 (Format ID:
|
|
1244
|
-
Row 3: A4: "Quarter" (Format ID: , Code: nil), B4: 0.75 (Format ID:
|
|
1242
|
+
Row 1: A2: "Half" (Format ID: , Code: nil), B2: 0.5 (Format ID: 166, Code: "# ?/?")
|
|
1243
|
+
Row 2: A3: "Third" (Format ID: , Code: nil), B3: 0.3333 (Format ID: 166, Code: "# ?/?")
|
|
1244
|
+
Row 3: A4: "Quarter" (Format ID: , Code: nil), B4: 0.75 (Format ID: 166, Code: "# ?/?")
|
|
1245
1245
|
```
|
|
1246
1246
|
|
|
1247
1247
|
<hr/>
|
|
@@ -1290,7 +1290,7 @@ end
|
|
|
1290
1290
|
```text
|
|
1291
1291
|
=== Read Validation ===
|
|
1292
1292
|
Row 0: A1: "Format" (Format ID: , Code: nil), B1: "Value" (Format ID: , Code: nil)
|
|
1293
|
-
Row 1: A2: "Percent with 2 Decimals" (Format ID: , Code: nil), B2: 0.12345 (Format ID:
|
|
1293
|
+
Row 1: A2: "Percent with 2 Decimals" (Format ID: , Code: nil), B2: 0.12345 (Format ID: 166, Code: "0.00%")
|
|
1294
1294
|
```
|
|
1295
1295
|
|
|
1296
1296
|
<hr/>
|
|
@@ -1340,8 +1340,8 @@ end
|
|
|
1340
1340
|
```text
|
|
1341
1341
|
=== Read Validation ===
|
|
1342
1342
|
Row 0: A1: "Format" (Format ID: , Code: nil), B1: "Value" (Format ID: , Code: nil)
|
|
1343
|
-
Row 1: A2: "Scientific" (Format ID: , Code: nil), B2: 123456789.0 (Format ID:
|
|
1344
|
-
Row 2: A3: "Small Scientific" (Format ID: , Code: nil), B3: 1.234e-05 (Format ID:
|
|
1343
|
+
Row 1: A2: "Scientific" (Format ID: , Code: nil), B2: 123456789.0 (Format ID: 166, Code: "0.00E+00")
|
|
1344
|
+
Row 2: A3: "Small Scientific" (Format ID: , Code: nil), B3: 1.234e-05 (Format ID: 166, Code: "0.00E+00")
|
|
1345
1345
|
```
|
|
1346
1346
|
|
|
1347
1347
|
<hr/>
|
|
@@ -2867,8 +2867,6 @@ Visual demonstration for Drawing Shapes.
|
|
|
2867
2867
|
|
|
2868
2868
|
<div><img src="../../test/visual/baselines/drawing_shapes/page-1.png" width="100%" alt="Preview"/></div>
|
|
2869
2869
|
|
|
2870
|
-
<div><img src="../../test/visual/baselines/drawing_shapes/page-2.png" width="100%" alt="Preview"/></div>
|
|
2871
|
-
|
|
2872
2870
|
### DSL Code
|
|
2873
2871
|
|
|
2874
2872
|
```ruby
|
|
@@ -2880,12 +2878,12 @@ output_path = ARGV[0] || "drawing_shapes.xlsx"
|
|
|
2880
2878
|
|
|
2881
2879
|
Xlsxrb.write(output_path) do |wb|
|
|
2882
2880
|
wb.sheet("Shapes") do |sheet|
|
|
2883
|
-
sheet.column(0..
|
|
2881
|
+
sheet.column(0..4, width: 12)
|
|
2884
2882
|
sheet.row(["Diagram with shapes and annotations"])
|
|
2885
2883
|
sheet.row([])
|
|
2886
|
-
sheet.shape(preset: "rect", text: "
|
|
2887
|
-
sheet.shape(preset: "rightArrow", text: "Next", from_col:
|
|
2888
|
-
sheet.shape(preset: "roundRect", text: "Processing", from_col:
|
|
2884
|
+
sheet.shape(preset: "rect", text: "Start", from_col: 0, from_row: 2, to_col: 1, to_row: 4)
|
|
2885
|
+
sheet.shape(preset: "rightArrow", text: "Next", from_col: 1, from_row: 3, to_col: 2, to_row: 4)
|
|
2886
|
+
sheet.shape(preset: "roundRect", text: "Processing", from_col: 2, from_row: 2, to_col: 4, to_row: 4)
|
|
2889
2887
|
end
|
|
2890
2888
|
end
|
|
2891
2889
|
|
|
@@ -4082,8 +4080,6 @@ Visual demonstration for Pivot Table.
|
|
|
4082
4080
|
|
|
4083
4081
|
<div><img src="../../test/visual/baselines/pivot_table/page-1.png" width="100%" alt="Preview"/></div>
|
|
4084
4082
|
|
|
4085
|
-
<div><img src="../../test/visual/baselines/pivot_table/page-2.png" width="100%" alt="Preview"/></div>
|
|
4086
|
-
|
|
4087
4083
|
### DSL Code
|
|
4088
4084
|
|
|
4089
4085
|
```ruby
|
|
@@ -4095,7 +4091,7 @@ output_path = ARGV[0] || "pivot_table.xlsx"
|
|
|
4095
4091
|
|
|
4096
4092
|
Xlsxrb.write(output_path) do |wb|
|
|
4097
4093
|
wb.sheet("SalesData") do |sheet|
|
|
4098
|
-
sheet.column(0..3, width:
|
|
4094
|
+
sheet.column(0..3, width: 14)
|
|
4099
4095
|
sheet.row(%w[Region Quarter Sales Rep])
|
|
4100
4096
|
sheet.row(["East", "Q1", 1000, "Alice"])
|
|
4101
4097
|
sheet.row(["West", "Q1", 1500, "Bob"])
|
|
@@ -4104,12 +4100,22 @@ Xlsxrb.write(output_path) do |wb|
|
|
|
4104
4100
|
sheet.row(["North", "Q1", 800, "Charlie"])
|
|
4105
4101
|
sheet.row(["North", "Q2", 950, "Charlie"])
|
|
4106
4102
|
|
|
4103
|
+
sheet.row([])
|
|
4104
|
+
sheet.row([])
|
|
4105
|
+
# Pre-populate summary cells in the pivot table target region (A10:D15) for headless renderers
|
|
4106
|
+
sheet.row(["Sum of Sales", "Quarter", nil, nil])
|
|
4107
|
+
sheet.row(["Region", "Q1", "Q2", "Grand Total"])
|
|
4108
|
+
sheet.row(["East", 1000, 1200, 2200])
|
|
4109
|
+
sheet.row(["North", 800, 950, 1750])
|
|
4110
|
+
sheet.row(["West", 1500, 1800, 3300])
|
|
4111
|
+
sheet.row(["Grand Total", 3300, 3950, 7250])
|
|
4112
|
+
|
|
4107
4113
|
sheet.pivot_table(
|
|
4108
4114
|
"SalesData!A1:D7",
|
|
4109
4115
|
row_fields: ["Region"],
|
|
4110
4116
|
data_fields: [{ name: "Sales", subtotal: "sum" }],
|
|
4111
4117
|
col_fields: ["Quarter"],
|
|
4112
|
-
dest_ref: "
|
|
4118
|
+
dest_ref: "A10",
|
|
4113
4119
|
name: "RegionalSalesSummary"
|
|
4114
4120
|
)
|
|
4115
4121
|
end
|
|
@@ -4135,6 +4141,14 @@ Row 3: A4: "East", B4: "Q2", C4: 1200, D4: "Alice"
|
|
|
4135
4141
|
Row 4: A5: "West", B5: "Q2", C5: 1800, D5: "Bob"
|
|
4136
4142
|
Row 5: A6: "North", B6: "Q1", C6: 800, D6: "Charlie"
|
|
4137
4143
|
Row 6: A7: "North", B7: "Q2", C7: 950, D7: "Charlie"
|
|
4144
|
+
Row 7:
|
|
4145
|
+
Row 8:
|
|
4146
|
+
Row 9: A10: "Sum of Sales", B10: "Quarter"
|
|
4147
|
+
Row 10: A11: "Region", B11: "Q1", C11: "Q2", D11: "Grand Total"
|
|
4148
|
+
Row 11: A12: "East", B12: 1000, C12: 1200, D12: 2200
|
|
4149
|
+
Row 12: A13: "North", B13: 800, C13: 950, D13: 1750
|
|
4150
|
+
Row 13: A14: "West", B14: 1500, C14: 1800, D14: 3300
|
|
4151
|
+
Row 14: A15: "Grand Total", B15: 3300, C15: 3950, D15: 7250
|
|
4138
4152
|
```
|
|
4139
4153
|
|
|
4140
4154
|
<hr/>
|
|
@@ -4494,8 +4508,6 @@ Visual demonstration for Table Styles.
|
|
|
4494
4508
|
|
|
4495
4509
|
<div><img src="../../test/visual/baselines/table_styles/page-1.png" width="100%" alt="Preview"/></div>
|
|
4496
4510
|
|
|
4497
|
-
<div><img src="../../test/visual/baselines/table_styles/page-2.png" width="100%" alt="Preview"/></div>
|
|
4498
|
-
|
|
4499
4511
|
### DSL Code
|
|
4500
4512
|
|
|
4501
4513
|
```ruby
|
|
@@ -4507,7 +4519,10 @@ output_path = ARGV[0] || "table_styles.xlsx"
|
|
|
4507
4519
|
|
|
4508
4520
|
Xlsxrb.write(output_path) do |wb|
|
|
4509
4521
|
wb.sheet("Table Example") do |sheet|
|
|
4510
|
-
sheet.column(0
|
|
4522
|
+
sheet.column(0, width: 8)
|
|
4523
|
+
sheet.column(1, width: 16)
|
|
4524
|
+
sheet.column(2, width: 16)
|
|
4525
|
+
sheet.column(3, width: 14)
|
|
4511
4526
|
sheet.row(%w[ID Name Department Salary])
|
|
4512
4527
|
sheet.row([101, "Alice Smith", "Engineering", 120_000])
|
|
4513
4528
|
sheet.row([102, "Bob Jones", "Marketing", 95_000])
|
|
@@ -4548,8 +4563,6 @@ Demonstrates disabling visible grid lines in spreadsheet view.
|
|
|
4548
4563
|
|
|
4549
4564
|
<div><img src="../../test/visual/baselines/view_show_grid_lines/page-1.png" width="100%" alt="Preview"/></div>
|
|
4550
4565
|
|
|
4551
|
-
<div><img src="../../test/visual/support/illustrations/view_show_grid_lines_page-2.png" width="100%" alt="Preview"/></div>
|
|
4552
|
-
|
|
4553
4566
|
### DSL Code
|
|
4554
4567
|
|
|
4555
4568
|
```ruby
|
|
@@ -4593,8 +4606,6 @@ Demonstrates setting custom zoom scale in sheet view (e.g. 150%).
|
|
|
4593
4606
|
|
|
4594
4607
|
<div><img src="../../test/visual/baselines/view_zoom_scale/page-1.png" width="100%" alt="Preview"/></div>
|
|
4595
4608
|
|
|
4596
|
-
<div><img src="../../test/visual/support/illustrations/view_zoom_scale_page-2.png" width="100%" alt="Preview"/></div>
|
|
4597
|
-
|
|
4598
4609
|
### DSL Code
|
|
4599
4610
|
|
|
4600
4611
|
```ruby
|
data/docs/wasm/ruby.wasm
CHANGED
|
Binary file
|
data/lib/xlsxrb/chart_builder.rb
CHANGED
|
@@ -80,7 +80,7 @@ module Xlsxrb
|
|
|
80
80
|
# @param kwargs [Hash] Keyword arguments for legend styling/layout.
|
|
81
81
|
# @return [Object] The configured legend property.
|
|
82
82
|
# @api public
|
|
83
|
-
#: (*(Hash[Symbol, String |
|
|
83
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
84
84
|
def legend(*args, **kwargs)
|
|
85
85
|
@options[:legend] = kwargs.empty? ? args.first : kwargs
|
|
86
86
|
end
|
|
@@ -91,7 +91,7 @@ module Xlsxrb
|
|
|
91
91
|
# @param kwargs [Hash] Keyword arguments for plot area configuration.
|
|
92
92
|
# @return [Object] The configured plot_area property.
|
|
93
93
|
# @api public
|
|
94
|
-
#: (*(Hash[Symbol, String |
|
|
94
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
95
95
|
def plot_area(*args, **kwargs)
|
|
96
96
|
@options[:plot_area] = kwargs.empty? ? args.first : kwargs
|
|
97
97
|
end
|
|
@@ -102,7 +102,7 @@ module Xlsxrb
|
|
|
102
102
|
# @param kwargs [Hash] Keyword arguments.
|
|
103
103
|
# @return [Object] The configured chart_space property.
|
|
104
104
|
# @api public
|
|
105
|
-
#: (*(Hash[Symbol, String |
|
|
105
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
106
106
|
def chart_space(*args, **kwargs)
|
|
107
107
|
@options[:chart_space] = kwargs.empty? ? args.first : kwargs
|
|
108
108
|
end
|
|
@@ -113,7 +113,7 @@ module Xlsxrb
|
|
|
113
113
|
# @param kwargs [Hash] Keyword arguments.
|
|
114
114
|
# @return [Object] The configured style property.
|
|
115
115
|
# @api public
|
|
116
|
-
#: (*(Hash[Symbol, String |
|
|
116
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String | Integer) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String | Integer)
|
|
117
117
|
def style(*args, **kwargs)
|
|
118
118
|
@options[:style] = kwargs.empty? ? args.first : kwargs
|
|
119
119
|
end
|
|
@@ -124,7 +124,7 @@ module Xlsxrb
|
|
|
124
124
|
# @param kwargs [Hash] Keyword arguments.
|
|
125
125
|
# @return [Object] The configured data_labels property.
|
|
126
126
|
# @api public
|
|
127
|
-
#: (*(Hash[Symbol, String |
|
|
127
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
128
128
|
def data_labels(*args, **kwargs)
|
|
129
129
|
@options[:data_labels] = kwargs.empty? ? args.first : kwargs
|
|
130
130
|
end
|
|
@@ -135,7 +135,7 @@ module Xlsxrb
|
|
|
135
135
|
# @param kwargs [Hash] Keyword arguments.
|
|
136
136
|
# @return [Boolean, String]
|
|
137
137
|
# @api public
|
|
138
|
-
#: (*(bool | String) args, **String |
|
|
138
|
+
#: (*(bool | String) args, **String | Numeric | bool | nil kwargs) -> (bool | String)
|
|
139
139
|
def plot_visible_only(*args, **kwargs)
|
|
140
140
|
@options[:plot_visible_only] = kwargs.empty? ? args.first : kwargs
|
|
141
141
|
end
|
|
@@ -146,7 +146,7 @@ module Xlsxrb
|
|
|
146
146
|
# @param kwargs [Hash] Keyword arguments.
|
|
147
147
|
# @return [String]
|
|
148
148
|
# @api public
|
|
149
|
-
#: (*(String) args, **String |
|
|
149
|
+
#: (*(String) args, **String | Numeric | bool | nil kwargs) -> String
|
|
150
150
|
def display_blanks_as(*args, **kwargs)
|
|
151
151
|
@options[:display_blanks_as] = kwargs.empty? ? args.first : kwargs
|
|
152
152
|
end
|
|
@@ -157,7 +157,7 @@ module Xlsxrb
|
|
|
157
157
|
# @param kwargs [Hash] Keyword arguments.
|
|
158
158
|
# @return [Object]
|
|
159
159
|
# @api public
|
|
160
|
-
#: (*(Hash[Symbol, String |
|
|
160
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
161
161
|
def view3d(*args, **kwargs)
|
|
162
162
|
@options[:view3d] = kwargs.empty? ? args.first : kwargs
|
|
163
163
|
end
|
|
@@ -168,7 +168,7 @@ module Xlsxrb
|
|
|
168
168
|
# @param kwargs [Hash] Keyword arguments.
|
|
169
169
|
# @return [Object]
|
|
170
170
|
# @api public
|
|
171
|
-
#: (*(Hash[Symbol, String |
|
|
171
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
172
172
|
def category_axis(*args, **kwargs)
|
|
173
173
|
@options[:category_axis] = kwargs.empty? ? args.first : kwargs
|
|
174
174
|
end
|
|
@@ -179,7 +179,7 @@ module Xlsxrb
|
|
|
179
179
|
# @param kwargs [Hash] Keyword arguments.
|
|
180
180
|
# @return [Object]
|
|
181
181
|
# @api public
|
|
182
|
-
#: (*(Hash[Symbol, String |
|
|
182
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
183
183
|
def value_axis(*args, **kwargs)
|
|
184
184
|
@options[:value_axis] = kwargs.empty? ? args.first : kwargs
|
|
185
185
|
end
|
|
@@ -190,7 +190,7 @@ module Xlsxrb
|
|
|
190
190
|
# @param kwargs [Hash] Keyword arguments.
|
|
191
191
|
# @return [Boolean, String]
|
|
192
192
|
# @api public
|
|
193
|
-
#: (*(bool | String) args, **String |
|
|
193
|
+
#: (*(bool | String) args, **String | Numeric | bool | nil kwargs) -> (bool | String)
|
|
194
194
|
def show_legend_key(*args, **kwargs)
|
|
195
195
|
@options[:show_legend_key] = kwargs.empty? ? args.first : kwargs
|
|
196
196
|
end
|
|
@@ -258,7 +258,7 @@ module Xlsxrb
|
|
|
258
258
|
# @param kwargs [Hash] Keyword arguments.
|
|
259
259
|
# @return [Object]
|
|
260
260
|
# @api public
|
|
261
|
-
#: (*(Hash[Symbol, String |
|
|
261
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
262
262
|
def fill(*args, **kwargs)
|
|
263
263
|
@options[:fill] = kwargs.empty? ? args.first : kwargs
|
|
264
264
|
end
|
|
@@ -269,7 +269,7 @@ module Xlsxrb
|
|
|
269
269
|
# @param kwargs [Hash] Keyword arguments.
|
|
270
270
|
# @return [Object]
|
|
271
271
|
# @api public
|
|
272
|
-
#: (*(Hash[Symbol, String |
|
|
272
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
273
273
|
def line(*args, **kwargs)
|
|
274
274
|
@options[:line] = kwargs.empty? ? args.first : kwargs
|
|
275
275
|
end
|
|
@@ -280,7 +280,7 @@ module Xlsxrb
|
|
|
280
280
|
# @param kwargs [Hash] Keyword arguments.
|
|
281
281
|
# @return [Object]
|
|
282
282
|
# @api public
|
|
283
|
-
#: (*(Hash[Symbol, String |
|
|
283
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
284
284
|
def trendline(*args, **kwargs)
|
|
285
285
|
@options[:trendline] = kwargs.empty? ? args.first : kwargs
|
|
286
286
|
end
|
|
@@ -291,7 +291,7 @@ module Xlsxrb
|
|
|
291
291
|
# @param kwargs [Hash] Keyword arguments.
|
|
292
292
|
# @return [Object]
|
|
293
293
|
# @api public
|
|
294
|
-
#: (*(Hash[Symbol, String |
|
|
294
|
+
#: (*(Hash[Symbol, String | Numeric | bool | nil] | String) args, **String | Numeric | bool | nil kwargs) -> (Hash[Symbol, String | Numeric | bool | nil] | String)
|
|
295
295
|
def data_labels(*args, **kwargs)
|
|
296
296
|
@options[:data_labels] = kwargs.empty? ? args.first : kwargs
|
|
297
297
|
end
|
|
@@ -302,7 +302,7 @@ module Xlsxrb
|
|
|
302
302
|
# @param kwargs [Hash] Keyword arguments.
|
|
303
303
|
# @return [Boolean, String]
|
|
304
304
|
# @api public
|
|
305
|
-
#: (*(bool | String) args, **String |
|
|
305
|
+
#: (*(bool | String) args, **String | Numeric | bool | nil kwargs) -> (bool | String)
|
|
306
306
|
def smooth(*args, **kwargs)
|
|
307
307
|
@options[:smooth] = kwargs.empty? ? args.first : kwargs
|
|
308
308
|
end
|
|
@@ -313,7 +313,7 @@ module Xlsxrb
|
|
|
313
313
|
# @param kwargs [Hash] Keyword arguments.
|
|
314
314
|
# @return [String]
|
|
315
315
|
# @api public
|
|
316
|
-
#: (*(String) args, **String |
|
|
316
|
+
#: (*(String) args, **String | Numeric | bool | nil kwargs) -> String
|
|
317
317
|
def shape(*args, **kwargs)
|
|
318
318
|
@options[:shape] = kwargs.empty? ? args.first : kwargs
|
|
319
319
|
end
|
|
@@ -324,7 +324,7 @@ module Xlsxrb
|
|
|
324
324
|
# @param kwargs [Hash] Keyword arguments.
|
|
325
325
|
# @return [String]
|
|
326
326
|
# @api public
|
|
327
|
-
#: (*(String) args, **String |
|
|
327
|
+
#: (*(String) args, **String | Numeric | bool | nil kwargs) -> String
|
|
328
328
|
def type(*args, **kwargs)
|
|
329
329
|
@options[:type] = kwargs.empty? ? args.first : kwargs
|
|
330
330
|
end
|