From 50bdeeeff37b64a61ce518cc8dbaad20ccf429fc Mon Sep 17 00:00:00 2001 From: Grzegorz Bizon Date: Thu, 9 Nov 2017 09:04:21 +0100 Subject: Make Bootable implementation easier to read --- qa/qa/scenario/bootable.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/qa/qa/scenario/bootable.rb b/qa/qa/scenario/bootable.rb index 7c54b642587..22496bcc2fc 100644 --- a/qa/qa/scenario/bootable.rb +++ b/qa/qa/scenario/bootable.rb @@ -30,14 +30,16 @@ module QA private - attr_reader :options - def attribute(name, arg, desc) - (@options ||= []).push(Option.new(name, arg, desc)) + options.push(Option.new(name, arg, desc)) + end + + def options + @options ||= [] end def has_attributes? - @options.to_a.any? + options.any? end end end -- cgit v1.2.1