Method: Qonfig::Commands::Definition::ExposeTOML#initialize
- Defined in:
- lib/qonfig/plugins/toml/commands/definition/expose_toml.rb
#initialize(file_path, strict: true, via:, env:) ⇒ ExposeTOML
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ExposeTOML.
53 54 55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/qonfig/plugins/toml/commands/definition/expose_toml.rb', line 53 def initialize(file_path, strict: true, via:, env:) unless env.is_a?(Symbol) || env.is_a?(String) || env.is_a?(Numeric) raise Qonfig::ArgumentError, ':env should be a string or a symbol' end raise Qonfig::ArgumentError, ':env should be provided' if env.to_s.empty? raise Qonfig::ArgumentError, 'used :via is unsupported' unless EXPOSERS.key?(via) @file_path = file_path @strict = strict @via = via @env = env end |