null.rb 525 Bytes
Newer Older
1 2 3 4 5
module Gitlab
  module Ci
    class Config
      module Node
        ##
6
        # This class represents an undefined node.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
        #
        # Implements the Null Object pattern.
        #
        class Null < Entry
          def value
            nil
          end

          def valid?
            true
          end

          def errors
            []
          end
22 23 24 25 26 27 28 29

          def specified?
            false
          end

          def relevant?
            false
          end
30 31 32 33 34
        end
      end
    end
  end
end