lib/simple/service/action/comment.rb in simple-service-0.1.6 vs lib/simple/service/action/comment.rb in simple-service-0.2.0
- old
+ new
@@ -1,15 +1,13 @@
-# rubocop:disable Metrics/AbcSize
-
# returns the comment for an action
class ::Simple::Service::Action::Comment # @private
attr_reader :short
attr_reader :full
def self.extract(action:)
file, line = action.source_location
lines = Extractor.extract_comment_lines(file: file, before_line: line)
- full = lines[2..-1].join("\n") if lines.length >= 2
+ full = lines[2..].join("\n") if lines.length >= 2
new short: lines[0], full: full
end
def initialize(short:, full:)
@short, @full = short, full