lib/kover/plugin.rb in danger-kover-0.0.6 vs lib/kover/plugin.rb in danger-kover-0.0.7
- old
+ new
@@ -52,33 +52,45 @@
# Fail if under threshould, just warn otherwise.
# @return [Boolean]
attr_accessor :fail_if_under_threshold
- # A getter for `fail_if_under_threshold`, returning `true` by default.
+ # A getter for `fail_if_under_threshold`, returning `true` if not defined.
# @return [Boolean]
def fail_if_under_threshold
- @fail_if_under_threshold ||= true
+ if defined?(@fail_if_under_threshold)
+ @fail_if_under_threshold
+ else
+ true
+ end
end
# Show plugin repository link.
# @return [Boolean]
attr_accessor :link_repository
# A getter for `link_repository`, returning `true` by default.
# @return [Boolean]
def link_repository
- @link_repository ||= true
+ if defined?(@link_repository)
+ @link_repository
+ else
+ true
+ end
end
# Show not found files in report count.
# @return [Boolean]
attr_accessor :count_not_found
# A getter for `count_not_found`, returning `true` by default.
# @return [Boolean]
def count_not_found
- @count_not_found ||= true
+ if defined?(@count_not_found)
+ @count_not_found
+ else
+ true
+ end
end
# Report coverage on diffed files, as well as overall coverage.
#
# @param [String] moduleName