Skip to content

Commit

Permalink
Rubocop autocorrections, unsafe
Browse files Browse the repository at this point in the history
  • Loading branch information
kspurgin committed Aug 21, 2024
1 parent 645c6ce commit dcb4533
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/emendate/parsed_date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def initialize(date:, orig:, qualifiers: [])
@date_end = nil
@date_start_full = date.earliest&.iso8601
@date_end_full = date.latest&.iso8601
@inclusive_range = date.range? ? true : false
@inclusive_range = date.range?
@qualifiers = (qualifiers + date.qualifiers).flatten.uniq
@date_type = date.class.name.split("::")[-1]
@source = date
Expand Down
2 changes: 1 addition & 1 deletion lib/emendate/segment_set_queryable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def segments_before(seg)
# @param seg [Segment]
# @return [SegmentSet] all {Segment}s before given seg, if any
def segments_after(seg)
segs = segments[(index_of(seg) + 1)..-1]
segs = segments[(index_of(seg) + 1)..]
Emendate::SegmentSet.new(segments: segs)
end

Expand Down
2 changes: 1 addition & 1 deletion lib/emendate/subsourceable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def subsources(as: :segset)
def subsource_segments
if respond_to?(:segments)
subsource_segments_for_segment_set
elsif self.class == Emendate::DateTypes::Range
elsif instance_of?(Emendate::DateTypes::Range)
subsource_segments_for_range
elsif date_type?
sources.subsources(as: :arr)
Expand Down

0 comments on commit dcb4533

Please sign in to comment.