rubocop-ast 1.4.0 → 1.4.1

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: 34e6f8d5799eb4f6871ac4666b174d020ca3131b801184b31324d7488abc64b8
4
- data.tar.gz: f0be9d5375bc11ae205a2b6343aa2db37afdd330bbde6d22c82ee54b1d6ae03d
3
+ metadata.gz: 514cdc7bddc33ed7ef5123a27b9a8c7f4977a6d5f79b677371e8ec9b0f8641c3
4
+ data.tar.gz: 66670e0fa5cf3e0710154714eb854624a592d72d219aee0e425e11be009892ab
5
5
  SHA512:
6
- metadata.gz: aa8d27ca9cb6cb156f4a5cc1a951860fa2c04ef0cdf425c4ce2255825a08e664c0255e24c75495c66028f8aeadcf59f524b14b409c6d644129ff95e7a2c56194
7
- data.tar.gz: 36c4874bf4e4dd2c8d076243ee08f670dcf17711ebced45f200f71dd720faf4cd1e119b9df491fcee140d33d94bc7ddc3fd88f8818665505702c24ac54e0b91e
6
+ metadata.gz: cc1dc3353b12e90a8166d02d7ddf95e80a966290c6f611500cc5b446a707456a6acbd15947d92399b3ddd004195e8c8da4b23dd3ca80c91226920dd269326621
7
+ data.tar.gz: 962af11aa6ad1d1b32117758661faa0e43f632cf6540df082e2e0aedabfecd7fb98adc9b30ff4ee5beb63674b2ad42a3dcc7b07a821e109e77b49868efce8b69
@@ -72,6 +72,7 @@ require_relative 'ast/node/return_node'
72
72
  require_relative 'ast/node/self_class_node'
73
73
  require_relative 'ast/node/send_node'
74
74
  require_relative 'ast/node/str_node'
75
+ require_relative 'ast/node/dstr_node'
75
76
  require_relative 'ast/node/super_node'
76
77
  require_relative 'ast/node/symbol_node'
77
78
  require_relative 'ast/node/until_node'
@@ -42,6 +42,7 @@ module RuboCop
42
42
  def: DefNode,
43
43
  defined?: DefinedNode,
44
44
  defs: DefNode,
45
+ dstr: DstrNode,
45
46
  ensure: EnsureNode,
46
47
  for: ForNode,
47
48
  forward_args: ForwardArgsNode,
@@ -68,7 +69,6 @@ module RuboCop
68
69
  csend: SendNode,
69
70
  send: SendNode,
70
71
  str: StrNode,
71
- dstr: StrNode,
72
72
  xstr: StrNode,
73
73
  sclass: SelfClassNode,
74
74
  super: SuperNode,
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RuboCop
4
+ module AST
5
+ # A node extension for `dstr` nodes. This will be used
6
+ # in place of a plain node when the builder constructs the AST, making
7
+ # its methods available to all `dstr` nodes within RuboCop.
8
+ class DstrNode < StrNode
9
+ def value
10
+ child_nodes.map do |child|
11
+ child.respond_to?(:value) ? child.value : child.source
12
+ end.join
13
+ end
14
+ end
15
+ end
16
+ end
@@ -3,7 +3,7 @@
3
3
  module RuboCop
4
4
  module AST
5
5
  module Version
6
- STRING = '1.4.0'
6
+ STRING = '1.4.1'
7
7
  end
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubocop-ast
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.0
4
+ version: 1.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bozhidar Batsov
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2021-01-01 00:00:00.000000000 Z
13
+ date: 2021-01-23 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: parser
@@ -76,6 +76,7 @@ files:
76
76
  - lib/rubocop/ast/node/const_node.rb
77
77
  - lib/rubocop/ast/node/def_node.rb
78
78
  - lib/rubocop/ast/node/defined_node.rb
79
+ - lib/rubocop/ast/node/dstr_node.rb
79
80
  - lib/rubocop/ast/node/ensure_node.rb
80
81
  - lib/rubocop/ast/node/float_node.rb
81
82
  - lib/rubocop/ast/node/for_node.rb