Sha256: 0dc675e1c6d36f3342092256d5adb531a688a889295ce13c6ca7c5351a84a752

Contents?: true

Size: 470 Bytes

Versions: 8

Compression:

Stored size: 470 Bytes

Contents

# frozen_string_literal: true

class Code
  class Object
    class Class < Object
      attr_reader :raw

      def initialize(raw)
        raw = raw.raw if raw.is_a?(Class)
        @raw = raw
      end

      def call(...)
        raw.call(...)
      end

      def to_s
        raw.name
      end

      def inspect
        to_s
      end

      def self.name
        "Class"
      end

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

Version data entries

8 entries across 8 versions & 1 rubygems

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