lib/ctf_party/flag.rb in ctf-party-1.2.0 vs lib/ctf_party/flag.rb in ctf-party-1.2.1

- old
+ new

@@ -14,12 +14,10 @@ # Show the actual flag configuration. See {.flag=}. def self.flag @@flag end - # rubocop:disable Metrics/LineLength - # Update the flag configuration. # @param hash [Hash] flag configuration # @option hash [String] :prefix prefix of the flag. Default: none. # @option hash [String] :suffix suffix of the flag. Default: none. # @option hash [Array<String>] :enclosing the characters used to surround @@ -37,11 +35,9 @@ # 'this_1s_a_fl4g'.flag # => "sigsegv{a5bec9e2a86b6b70d288451eb38dfec8}" def self.flag=(hash) hash.select! { |k, _v| @@flag.key?(k) } @@flag.merge!(hash) end - - # rubocop:enable Metrics/LineLength # Format the current string into the configured flag format. See {.flag=} # example. # @return [String] the format flag. def flag