File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
13class Code
24 module Concerns
35 end
Original file line number Diff line number Diff line change 1+ # frozen_string_literal: true
2+
13class Code
24 module Concerns
35 module Shared
@@ -124,7 +126,10 @@ def call(**args)
124126
125127 code_context . code_fetch ( self )
126128 else
127- raise ( Error , "#{ code_operator . inspect } not defined on #{ code_inspect } :#{ code_name } " )
129+ raise (
130+ Error ,
131+ "#{ code_operator . inspect } not defined on #{ code_inspect } :#{ code_name } "
132+ )
128133 end
129134 end
130135
Original file line number Diff line number Diff line change @@ -34,8 +34,8 @@ def self.name
3434 super . split ( "::" ) [ 2 ..] . join ( "::" )
3535 end
3636
37- def self . code_new ( *args )
38- new ( *args )
37+ def self . code_new ( *)
38+ new ( *)
3939 end
4040
4141 def name
Original file line number Diff line number Diff line change @@ -437,7 +437,7 @@ def code_sum
437437 end
438438
439439 def code_deep_duplicate
440- List . new ( raw . dup . map { | element | element . code_deep_duplicate } )
440+ List . new ( raw . dup . map ( & : code_deep_duplicate) )
441441 end
442442
443443 def code_get ( argument )
Original file line number Diff line number Diff line change @@ -4,17 +4,18 @@ class Code
44 class Object
55 class String < Object
66 def initialize ( *args , **_kargs , &)
7- if args . first . is_an? ( Class )
8- @raw = args . first . raw . name
9- elsif args . first . is_an? ( Object )
10- @raw = args . first . raw . to_s
11- elsif args . first . is_a? ( ::Class )
12- @raw = args . first . name
13- elsif args . first
14- @raw = args . first . to_s
15- else
16- @raw = ""
17- end
7+ @raw =
8+ if args . first . is_an? ( Class )
9+ args . first . raw . name
10+ elsif args . first . is_an? ( Object )
11+ args . first . raw . to_s
12+ elsif args . first . is_a? ( ::Class )
13+ args . first . name
14+ elsif args . first
15+ args . first . to_s
16+ else
17+ ""
18+ end
1819 end
1920
2021 def call ( **args )
You can’t perform that action at this time.
0 commit comments