debian-mirror-gitlab/lib/gitlab/ci/config/entry/attributable.rb
2017-08-17 22:00:37 +05:30

23 lines
491 B
Ruby

module Gitlab
module Ci
class Config
module Entry
module Attributable
extend ActiveSupport::Concern
class_methods do
def attributes(*attributes)
attributes.flatten.each do |attribute|
define_method(attribute) do
return unless config.is_a?(Hash)
config[attribute]
end
end
end
end
end
end
end
end
end