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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d8f07ece7647c8a08b818c2221a625076d0108018a015c9752c3dd2b40e88a0b
4
- data.tar.gz: 288fe4424fe0739514fc34479ecf1292b6e0277369e1b4e1bdf00445eebd18c1
3
+ metadata.gz: 8d0298c4fcdefba32c3bad640c7d226c7762927d798c13ccd9ee8f3b9435b018
4
+ data.tar.gz: 231ce8a3d7f87818e52ad35285666fba86722768aae493456b5dc16beea9c31b
5
5
  SHA512:
6
- metadata.gz: aec2589dc56ae830a82d36dd3f9005427d9ac3008381397a7b876187d990ffceb00b69a0c781a39871da3c6ffcaf53ece8749633c24b18cddf1f6993bbb79f1e
7
- data.tar.gz: 26ac7c6070382e493c9b879807eb11962ccdd579a4ad054bacc039dda8d0e66ee05beaad14d36f192d2c41119032eda75992830a184804c8effcbd54b6bdf0eb
6
+ metadata.gz: a6596a13b6c128a6a8c7cefd0896e6057a88e307c300a1ef7e60a6ceb3df4ab20aa80bac2dcc8b31ef395db8a74b145cc78dae800cf6bbbf60dc0e6e319c9434
7
+ data.tar.gz: 9936cc6041d343ee2a2c1a6a4f488aa3666ec2738609e20639e56f0b093bf49a22dcff93dba7fd5ff645c689892bb5d12ea43a60762977cf69f41d85671c1ebe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- code-ruby (1.2.6)
4
+ code-ruby (1.2.7)
5
5
  activesupport
6
6
  base64
7
7
  bigdecimal
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.6
1
+ 1.2.7
@@ -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.6
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-24 00:00:00.000000000 Z
10
+ date: 2025-03-25 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: activesupport