Removes profiles reader and replaces with ivar

The profiles method was never public and the @profiles is clearer.

Signed-off-by: Franklin Webber <franklin@chef.io>
This commit is contained in:
Franklin Webber 2016-12-14 13:02:28 -06:00
parent 0a0431ac29
commit ad82ac48c8

View file

@ -107,7 +107,7 @@ class InspecRspecJson < InspecRspecMiniJson # rubocop:disable Metrics/ClassLengt
# Called by the runner during example collection.
def add_profile(profile)
profiles.push(profile)
@profiles.push(profile)
end
def stop(notification)
@ -124,8 +124,6 @@ class InspecRspecJson < InspecRspecMiniJson # rubocop:disable Metrics/ClassLengt
private
attr_reader :profiles
def all_unique_controls
Array(@all_controls).uniq
end
@ -205,7 +203,7 @@ class InspecRspecJson < InspecRspecMiniJson # rubocop:disable Metrics/ClassLengt
end
def profiles_info
@profiles_info ||= profiles.map(&:info!).map(&:dup)
@profiles_info ||= @profiles.map(&:info!).map(&:dup)
end
def example2control(example)