Sha256: f9ef4e6c138cf19d29e288652026598e343c1b250334f038d075dd739afa16ab

Contents?: true

Size: 419 Bytes

Versions: 9

Compression:

Stored size: 419 Bytes

Contents

# frozen_string_literal: true

class Code
  class Object
    class Nothing < ::Code::Object
      attr_reader :raw

      def initialize
        @raw = nil
      end

      def self.name
        "Nothing"
      end

      def inspect
        "nothing"
      end

      def to_s
        ""
      end

      def truthy?
        false
      end

      def as_json(...)
        raw.as_json(...)
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
code-ruby-0.11.0 lib/code/object/nothing.rb
code-ruby-0.10.4 lib/code/object/nothing.rb
code-ruby-0.10.3 lib/code/object/nothing.rb
code-ruby-0.10.2 lib/code/object/nothing.rb
code-ruby-0.10.1 lib/code/object/nothing.rb
code-ruby-0.10.0 lib/code/object/nothing.rb
code-ruby-0.9.3 lib/code/object/nothing.rb
code-ruby-0.9.2 lib/code/object/nothing.rb
code-ruby-0.9.1 lib/code/object/nothing.rb