nokolexbor 0.3.3-arm64-darwin → 0.3.4-arm64-darwin

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d3990d88b4adf5ec56a011b36d842c8add5c45ada73978dec977ceaab7b6d47
4
- data.tar.gz: b9e84140c6263736043f34f4a3b46af5a1eac0f5bda23d26c4558cbd9849ee4c
3
+ metadata.gz: 4f0cde2a5705c45c57380e6a7ffd1abd7664a8a50fd1c7fdd21d98f33d6f7f6a
4
+ data.tar.gz: 03fda5a9b9d461e33d92c07e0c368301572a4a0c395aa9dbc258c017d6c45788
5
5
  SHA512:
6
- metadata.gz: a09f67d4f44889030a1d910ec1c5d2c8f6f6fb6d29e0892ca6e8f00de1d8ff8d0af1e46a3fe2c969c0d0d961a9d2a083acc772b7b51eafd4548000392e08beba
7
- data.tar.gz: 576bebf4dbc21f0b785d7cf5064c2424f96ef0613e3d8544530734e30db57d4fbaff7978fbec31d231cca4c436a3e270f5241c29129d63cd9a27eedaaa84044f
6
+ metadata.gz: 21b8fea4f137b59fcddb6a7583fa953c4dc074a21ab96fbbf59e62a2a17792bf1ed9845bf78150aa8d0bf8e3203463b4de646e54147418ae889cded52270f7fe
7
+ data.tar.gz: 7ec21ee2352218657f7754b45e6dc8064176e656b876f160bb32e9baa3d85afee4600a1a06da4f8755694eb299b36694e2ca9a48d7fc0e9b99dcd9ccc31e7de0
Binary file
Binary file
Binary file
Binary file
@@ -145,13 +145,10 @@ module Nokolexbor
145
145
  ancestors.last.css(selector).any? { |node| node == self }
146
146
  end
147
147
 
148
- def attribute(name)
149
- return nil unless key?(name)
150
- Attribute.new(name, attr(name))
151
- end
152
-
153
148
  def attributes
154
- attrs.map { |k, v| [k, Attribute.new(k, v)] }.to_h
149
+ attribute_nodes.each_with_object({}) do |node, hash|
150
+ hash[node.name] = node
151
+ end
155
152
  end
156
153
 
157
154
  def replace(node)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Nokolexbor
4
- VERSION = '0.3.3'
4
+ VERSION = '0.3.4'
5
5
  end
data/lib/nokolexbor.rb CHANGED
@@ -26,7 +26,6 @@ require 'nokolexbor/node'
26
26
  require 'nokolexbor/document'
27
27
  require 'nokolexbor/node_set'
28
28
  require 'nokolexbor/document_fragment'
29
- require 'nokolexbor/attribute'
30
29
  require 'nokolexbor/xpath'
31
30
  require 'nokolexbor/xpath_context'
32
31
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nokolexbor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: arm64-darwin
6
6
  authors:
7
7
  - Yicheng Zhou
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-09 00:00:00.000000000 Z
11
+ date: 2023-01-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake-compiler
@@ -50,7 +50,6 @@ files:
50
50
  - lib/nokolexbor/2.7/nokolexbor.bundle
51
51
  - lib/nokolexbor/3.0/nokolexbor.bundle
52
52
  - lib/nokolexbor/3.1/nokolexbor.bundle
53
- - lib/nokolexbor/attribute.rb
54
53
  - lib/nokolexbor/document.rb
55
54
  - lib/nokolexbor/document_fragment.rb
56
55
  - lib/nokolexbor/node.rb
@@ -1,18 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Nokolexbor
4
- class Attribute
5
- attr_accessor :name
6
- attr_accessor :value
7
-
8
- def initialize(name, value)
9
- @name = name
10
- @value = value
11
- end
12
-
13
- alias_method :text, :value
14
- alias_method :content, :value
15
- alias_method :to_s, :value
16
- alias_method :to_str, :value
17
- end
18
- end