diff options
author | Austin Ziegler <austin@zieglers.ca> | 2021-12-23 11:03:11 -0500 |
---|---|---|
committer | Austin Ziegler <austin@zieglers.ca> | 2022-07-04 20:26:10 -0400 |
commit | 396a82c4d56bc0067c86de7cd32a4ae75f292c41 (patch) | |
tree | e02145c03c77cfa7109e8fb06c8213c42562f1ea /lib | |
parent | 5da19290c4b33f579f3b176192b7b15c151bdd00 (diff) | |
download | diff-lcs-396a82c4d56bc0067c86de7cd32a4ae75f292c41.tar.gz |
standardrb --only Layout/LeadingCommentSpace --fix
Diffstat (limited to 'lib')
-rw-r--r-- | lib/diff/lcs.rb | 10 | ||||
-rw-r--r-- | lib/diff/lcs/callbacks.rb | 2 | ||||
-rw-r--r-- | lib/diff/lcs/htmldiff.rb | 4 | ||||
-rw-r--r-- | lib/diff/lcs/hunk.rb | 6 | ||||
-rw-r--r-- | lib/diff/lcs/ldiff.rb | 10 |
5 files changed, 16 insertions, 16 deletions
diff --git a/lib/diff/lcs.rb b/lib/diff/lcs.rb index db2b03d..031e2d7 100644 --- a/lib/diff/lcs.rb +++ b/lib/diff/lcs.rb @@ -67,7 +67,7 @@ module Diff::LCS # rubocop:disable Style/Documentation # identically for key purposes. That is: # # O.new('a').eql?(O.new('a')) == true - def lcs(other, &block) #:yields: self[i] if there are matched subsequences + def lcs(other, &block) # :yields: self[i] if there are matched subsequences Diff::LCS.lcs(self, other, &block) end @@ -141,7 +141,7 @@ module Diff::LCS # rubocop:disable Style/Documentation end class << Diff::LCS - def lcs(seq1, seq2, &block) #:yields: seq1[i] for each matched + def lcs(seq1, seq2, &block) # :yields: seq1[i] for each matched matches = Diff::LCS::Internals.lcs(seq1, seq2) ret = [] string = seq1.kind_of? String @@ -197,7 +197,7 @@ class << Diff::LCS # # insert # end # end - def sdiff(seq1, seq2, callbacks = nil, &block) #:yields: diff changes + def sdiff(seq1, seq2, callbacks = nil, &block) # :yields: diff changes diff_traversal(:sdiff, seq1, seq2, callbacks || Diff::LCS::SDiffCallbacks, &block) end @@ -282,7 +282,7 @@ class << Diff::LCS # <tt>callbacks#discard_b</tt> will be called after the end of the sequence # is reached, if +a+ has not yet reached the end of +A+ or +b+ has not yet # reached the end of +B+. - def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) #:yields: change events + def traverse_sequences(seq1, seq2, callbacks = Diff::LCS::SequenceCallbacks) # :yields: change events callbacks ||= Diff::LCS::SequenceCallbacks matches = Diff::LCS::Internals.lcs(seq1, seq2) @@ -576,7 +576,7 @@ class << Diff::LCS end end - PATCH_MAP = { #:nodoc: + PATCH_MAP = { # :nodoc: :patch => { "+" => "+", "-" => "-", "!" => "!", "=" => "=" }.freeze, :unpatch => { "+" => "-", "-" => "+", "!" => "!", "=" => "=" }.freeze }.freeze diff --git a/lib/diff/lcs/callbacks.rb b/lib/diff/lcs/callbacks.rb index 54b3686..cdda2dd 100644 --- a/lib/diff/lcs/callbacks.rb +++ b/lib/diff/lcs/callbacks.rb @@ -302,7 +302,7 @@ class Diff::LCS::SDiffCallbacks # Returns the difference set collected during the diff process. attr_reader :diffs - def initialize #:yields: self + def initialize # :yields: self @diffs = [] yield self if block_given? end diff --git a/lib/diff/lcs/htmldiff.rb b/lib/diff/lcs/htmldiff.rb index 37bbc4a..7eab41d 100644 --- a/lib/diff/lcs/htmldiff.rb +++ b/lib/diff/lcs/htmldiff.rb @@ -5,11 +5,11 @@ require "cgi" # Produce a simple HTML diff view. class Diff::LCS::HTMLDiff class << self - attr_accessor :can_expand_tabs #:nodoc: + attr_accessor :can_expand_tabs # :nodoc: end self.can_expand_tabs = true - class Callbacks #:nodoc: + class Callbacks # :nodoc: attr_accessor :output attr_accessor :match_class attr_accessor :only_a_class diff --git a/lib/diff/lcs/hunk.rb b/lib/diff/lcs/hunk.rb index eccfc7a..d886ba2 100644 --- a/lib/diff/lcs/hunk.rb +++ b/lib/diff/lcs/hunk.rb @@ -6,8 +6,8 @@ require "diff/lcs/block" # each block. (So if we're not using context, every hunk will contain one # block.) Used in the diff program (bin/ldiff). class Diff::LCS::Hunk - OLD_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze #:nodoc: - ED_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze #:nodoc: + OLD_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze # :nodoc: + ED_DIFF_OP_ACTION = { "+" => "a", "-" => "d", "!" => "c" }.freeze # :nodoc: private_constant :OLD_DIFF_OP_ACTION, :ED_DIFF_OP_ACTION if respond_to?(:private_constant) @@ -69,7 +69,7 @@ class Diff::LCS::Hunk # to this hunk. attr_accessor :flag_context # rubocop:disable Layout/EmptyLinesAroundAttributeAccessor undef :flag_context= - def flag_context=(context) #:nodoc: # rubocop:disable Lint/DuplicateMethods + def flag_context=(context) # :nodoc: # rubocop:disable Lint/DuplicateMethods return if context.nil? || context.zero? add_start = context > @start_old ? @start_old : context diff --git a/lib/diff/lcs/ldiff.rb b/lib/diff/lcs/ldiff.rb index 1896203..961458c 100644 --- a/lib/diff/lcs/ldiff.rb +++ b/lib/diff/lcs/ldiff.rb @@ -4,7 +4,7 @@ require "optparse" require "ostruct" require "diff/lcs/hunk" -module Diff::LCS::Ldiff #:nodoc: +module Diff::LCS::Ldiff # :nodoc: # standard:disable Layout/HeredocIndentation BANNER = <<-COPYRIGHT ldiff #{Diff::LCS::VERSION} @@ -21,11 +21,11 @@ ldiff #{Diff::LCS::VERSION} end class << Diff::LCS::Ldiff - attr_reader :format, :lines #:nodoc: - attr_reader :file_old, :file_new #:nodoc: - attr_reader :data_old, :data_new #:nodoc: + attr_reader :format, :lines # :nodoc: + attr_reader :file_old, :file_new # :nodoc: + attr_reader :data_old, :data_new # :nodoc: - def run(args, _input = $stdin, output = $stdout, error = $stderr) #:nodoc: + def run(args, _input = $stdin, output = $stdout, error = $stderr) # :nodoc: @binary = nil args.options do |o| |