lib/snapshot/snapshot_file.rb in snapshot-0.3.1 vs lib/snapshot/snapshot_file.rb in snapshot-0.3.2

- old
+ new

@@ -24,11 +24,11 @@ case method_sym when :devices self.verify_devices(value) when :languages - self.verify_languages(value) + @config.languages = value when :ios_version raise "ios_version has to be an String".red unless value.kind_of?String @config.ios_version = value when :scheme raise "scheme has to be an String".red unless value.kind_of?String @@ -45,10 +45,12 @@ @config.html_path = value.gsub("~", ENV['HOME']) @config.html_path = @config.html_path + "/screenshots.html" unless @config.html_path.include?".html" when :build_command raise "build_command has to be an String".red unless value.kind_of?String @config.build_command = value + when :skip_alpha_removal + @config.skip_alpha_removal = true when :project_path raise "project_path has to be an String".red unless value.kind_of?String if File.exists?value and (value.end_with?".xcworkspace" or value.end_with?".xcodeproj") @config.project_path = value.gsub("~", ENV['HOME']) @@ -75,18 +77,8 @@ raise "Device '#{current}' not found. Available device types: #{Simulators.available_devices}".red else @config.devices << current end end - end - - def verify_languages(value) - raise "Languages has to be an array".red unless value.kind_of?Array - value.each do |current| - unless Languages::ALL_LANGUAGES.include?current - raise "Language '#{current}' not found. Available languages: #{Languages::ALL_LANGUAGES}".red - end - end - @config.languages = value end end end \ No newline at end of file