cw_card_utils 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/README.md +113 -5
- data/lib/cw_card_utils/curve_calculator.rb +50 -0
- data/lib/cw_card_utils/deck_comparator.rb +47 -0
- data/lib/cw_card_utils/decklist_parser/archetype_detector.rb +34 -0
- data/lib/cw_card_utils/decklist_parser/card.rb +67 -2
- data/lib/cw_card_utils/decklist_parser/card_tagger.rb +32 -0
- data/lib/cw_card_utils/decklist_parser/color_identity_resolver.rb +7 -0
- data/lib/cw_card_utils/decklist_parser/deck.rb +177 -1
- data/lib/cw_card_utils/decklist_parser/parser.rb +26 -0
- data/lib/cw_card_utils/scryfall_cmc_data.rb +94 -6
- data/lib/cw_card_utils/synergy_probability.rb +35 -1
- data/lib/cw_card_utils/version.rb +8 -1
- data/lib/cw_card_utils.rb +21 -1
- metadata +2 -1
data/lib/cw_card_utils.rb
CHANGED
@@ -7,17 +7,37 @@ require_relative "cw_card_utils/scryfall_cmc_data"
|
|
7
7
|
require_relative "cw_card_utils/synergy_probability"
|
8
8
|
require_relative "cw_card_utils/deck_comparator"
|
9
9
|
|
10
|
+
##
|
11
|
+
# Public: Top-level namespace for Card Utils.
|
12
|
+
# 日本語: Card Utils のトップレベル名前空間です。
|
10
13
|
module CwCardUtils
|
14
|
+
##
|
15
|
+
# Public: Gem-specific error base class.
|
16
|
+
# 日本語: このライブラリ用の基本的なエラークラスです。
|
11
17
|
class Error < StandardError; end
|
12
18
|
|
13
|
-
# Configuration for the library
|
19
|
+
# Public: Configuration for the library.
|
20
|
+
# 日本語: ライブラリの設定を行います。
|
14
21
|
class << self
|
22
|
+
# Public: Overrides the global card data source.
|
23
|
+
# 日本語: グローバルなカードデータソースを上書きします。
|
24
|
+
#
|
25
|
+
# @param source [CwCardUtils::CardDataSource]
|
15
26
|
attr_writer :card_data_source
|
16
27
|
|
28
|
+
# Public: Returns the global card data source used by parsers and models.
|
29
|
+
# 日本語: パーサやモデルが使用するグローバルなカードデータソースを返します。
|
30
|
+
#
|
31
|
+
# @return [CwCardUtils::CardDataSource]
|
17
32
|
def card_data_source
|
18
33
|
@card_data_source ||= ScryfallCmcData.instance
|
19
34
|
end
|
20
35
|
|
36
|
+
# Public: Yields the module for configuration.
|
37
|
+
# 日本語: 設定用にモジュール自身をブロックに渡します。
|
38
|
+
#
|
39
|
+
# @yield [CwCardUtils]
|
40
|
+
# @return [void]
|
21
41
|
def configure
|
22
42
|
yield self if block_given?
|
23
43
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cw_card_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Stenhouse
|
@@ -57,6 +57,7 @@ metadata:
|
|
57
57
|
homepage_uri: https://cracklingwit.com
|
58
58
|
source_code_uri: https://github.com/cracklingwit/card_utils
|
59
59
|
changelog_uri: https://github.com/cracklingwit/card_utils/commits/main/
|
60
|
+
documentation_uri: https://card-utils.rdoc.cracklingwit.com
|
60
61
|
rdoc_options: []
|
61
62
|
require_paths:
|
62
63
|
- lib
|