Sha256: 05afd44d5825646fdf78bbfdab17952480ebb24d595aa4bb4cd7ab3a7386c66b

Contents?: true

Size: 445 Bytes

Versions: 46

Compression:

Stored size: 445 Bytes

Contents

module Liquidscript
  module Compiler
    class Base

      # Responds to all methods with `nil`.
      class Blank

        # Respond to all methods, with `nil`.
        #
        # @return [nil]
        def method_missing(*_, &block)
          nil
        end

        # Tells Ruby that we respond to all methods.
        #
        # @return [true]
        def respond_to_missing?(_, __)
          true
        end
      end
    end
  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
liquidscript-0.7.4 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.7.3 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.7.2 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.7.1 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.7.0 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.6.5 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.6.4 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.6.3 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.6.2 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.6.1 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.6.0 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.5.1 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.5.0 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.4.1 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.4.0 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.3.1 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.3.0 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.2.1 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.2.0 lib/liquidscript/compiler/base/blank.rb
liquidscript-0.1.5 lib/liquidscript/compiler/base/blank.rb