minecraft_items 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/minecraft_items.rb +6 -2
- data/minecraft_items.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8cedc213741996459a366fd3734af6e7371035e80a1d0abbbce798b95af8275
|
4
|
+
data.tar.gz: ac0dd90c1a540bd19597c4c6c6e2857d778277151d76e028aec27db9db4a3d8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b0faf77913a2252bd7b2aea95c07cdb704e40e147d2d3e0ba111dba6228dd797803d83500eb0c84dec9cd1d56ea1c8450018de9fd07ee5c483a3e028671db8d2
|
7
|
+
data.tar.gz: 460f03d3fb798e51cccace74ade255700741e0db356d027ecf2abd5970c51ec59bd9bbb33ee25d99e02322d83355b5c9a56f37028066a60c076976a77360c009
|
data/lib/minecraft_items.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'active_support/core_ext/hash/indifferent_access'
|
2
|
+
require 'active_support/core_ext/string/inflections'
|
2
3
|
require 'block_types'
|
3
4
|
|
4
5
|
class MinecraftItems
|
@@ -6,10 +7,12 @@ class MinecraftItems
|
|
6
7
|
include BlockTypes
|
7
8
|
|
8
9
|
def method_missing(method_name)
|
9
|
-
if method_name.to_s.include?("
|
10
|
+
if method_name.to_s.include?("all_variants_and_types")
|
11
|
+
(minecraft_variants.values + minecraft_types.values).flatten.map { |type_or_variant| type_or_variant.titleize}.sort
|
12
|
+
elsif method_name.to_s.include?("all_types")
|
10
13
|
minecraft_types
|
11
14
|
elsif method_name.to_s.include?("all_variants")
|
12
|
-
minecraft_variants
|
15
|
+
minecraft_variants.values.flatten.map { |variants| variants.titleize }.sort
|
13
16
|
elsif method_name.to_s.include?("_variants")
|
14
17
|
minecraft_variants[method_name]
|
15
18
|
elsif method_name.to_s.include?("_types")
|
@@ -20,3 +23,4 @@ class MinecraftItems
|
|
20
23
|
end
|
21
24
|
end
|
22
25
|
end
|
26
|
+
|
data/minecraft_items.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'minecraft_items'
|
3
|
-
s.version = '0.1.
|
3
|
+
s.version = '0.1.6'
|
4
4
|
s.licenses = ['MIT']
|
5
5
|
s.summary = "A list of most minecraft items"
|
6
6
|
s.description = "With a few simple commands return all the types of blocks as well as each types variant."
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minecraft_items
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Maximilian Alexander
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2023-03-
|
12
|
+
date: 2023-03-27 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: With a few simple commands return all the types of blocks as well as
|
15
15
|
each types variant.
|