BigW Consortium Gitlab

Commit 61f7bede by Grzegorz Bizon

Fix using `try` on delegators in CI config entries

parent 06641a3f
......@@ -51,12 +51,12 @@ module Gitlab
def helpers(*nodes)
nodes.each do |symbol|
define_method("#{symbol}_defined?") do
@entries[symbol].specified?
@entries[symbol].specified? if @entries[symbol]
end
define_method("#{symbol}_value") do
raise Entry::InvalidError unless valid?
@entries[symbol].try(:value)
@entries[symbol].value if @entries[symbol]
end
alias_method symbol.to_sym, "#{symbol}_value".to_sym
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment