code-ruby 1.2.6 → 1.2.7
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/Gemfile.lock +1 -1
- data/VERSION +1 -1
- data/lib/code/object/html.rb +13 -0
- 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: 8d0298c4fcdefba32c3bad640c7d226c7762927d798c13ccd9ee8f3b9435b018
|
4
|
+
data.tar.gz: 231ce8a3d7f87818e52ad35285666fba86722768aae493456b5dc16beea9c31b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a6596a13b6c128a6a8c7cefd0896e6057a88e307c300a1ef7e60a6ceb3df4ab20aa80bac2dcc8b31ef395db8a74b145cc78dae800cf6bbbf60dc0e6e319c9434
|
7
|
+
data.tar.gz: 9936cc6041d343ee2a2c1a6a4f488aa3666ec2738609e20639e56f0b093bf49a22dcff93dba7fd5ff645c689892bb5d12ea43a60762977cf69f41d85671c1ebe
|
data/Gemfile.lock
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.2.
|
1
|
+
1.2.7
|
data/lib/code/object/html.rb
CHANGED
@@ -59,6 +59,9 @@ class Code
|
|
59
59
|
when "css"
|
60
60
|
sig(args) { String }
|
61
61
|
code_css(code_value)
|
62
|
+
when "at_css"
|
63
|
+
sig(args) { String }
|
64
|
+
code_at_css(code_value)
|
62
65
|
when "map"
|
63
66
|
sig(args) { Function }
|
64
67
|
code_map(code_value, **globals)
|
@@ -76,6 +79,12 @@ class Code
|
|
76
79
|
Html.new(raw.css(code_query.raw))
|
77
80
|
end
|
78
81
|
|
82
|
+
def code_at_css(query)
|
83
|
+
code_query = query.to_code
|
84
|
+
|
85
|
+
Html.new(raw.at_css(code_query.raw))
|
86
|
+
end
|
87
|
+
|
79
88
|
def code_map(argument, **globals)
|
80
89
|
code_argument = argument.to_code
|
81
90
|
|
@@ -91,6 +100,10 @@ class Code
|
|
91
100
|
)
|
92
101
|
end
|
93
102
|
|
103
|
+
def to_s
|
104
|
+
raw.text
|
105
|
+
end
|
106
|
+
|
94
107
|
def code_to_string
|
95
108
|
String.new(raw.text)
|
96
109
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dorian Marié
|
8
8
|
bindir: bin
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-03-
|
10
|
+
date: 2025-03-25 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: activesupport
|