This repository was archived by the owner on Aug 10, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 6 files changed +4
-8
lines changed
Expand file tree Collapse file tree 6 files changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,3 @@ def config
3232
3333loader = Zeitwerk ::Loader . for_gem
3434loader . setup
35- loader . eager_load
Original file line number Diff line number Diff line change 1+ require "paint"
2+
13module Rexer
24 module Commands
35 class Init
Original file line number Diff line number Diff line change @@ -63,7 +63,7 @@ def hooks = @hooks ||= {}
6363 end
6464
6565 def build_source ( opts )
66- type = opts . keys . find { Rexer ::Source . names . include ?( _1 ) }
66+ type = opts . keys . find { Rexer ::Source . const_defined ?( _1 . capitalize ) }
6767 Source . new ( type , opts [ type ] ) if type
6868 end
6969 end
Original file line number Diff line number Diff line change 11module Rexer
22 module Source
3- def self . names = @names ||= [ ]
4-
53 def self . from_definition ( source )
64 const_get ( source . type . capitalize ) . new ( **source . options )
75 end
Original file line number Diff line number Diff line change 11module Rexer
22 module Source
33 class Base
4- def self . inherited ( subclass )
5- Source . names << subclass . name . split ( "::" ) . last . downcase . to_sym
6- end
7-
84 # Load the source to the given path.
95 def load ( _path )
106 raise "Not implemented"
Original file line number Diff line number Diff line change 11require "test_helper"
22require "open3"
33require "rake"
4+ require "paint"
45require "securerandom"
56
67ENV [ "RUBY_VERSION" ] ||= "3.3"
You can’t perform that action at this time.
0 commit comments