Skip to content

Instantly share code, notes, and snippets.

@felginep
felginep / RequiredOptions.rb
Created October 7, 2020 06:28
Create lanes with non optional parameters and raises an error if we try to access a missing value from the `option` hash
class Fastlane::FastFile # from https://github.com/fastlane/fastlane/blob/master/fastlane/lib/fastlane/fast_file.rb
# Hash that raises an error when we access a missing value
class RequiredOptions < Hash
def initialize(options, lane)
options.each { |key, value| self[key] = value }
@lane = lane
end