Sha256: ed2fe43052b6f0c4eece4dd38a9863be9404709a5f76d3a5b7fea328569b957a

Contents?: true

Size: 396 Bytes

Versions: 1

Compression:

Stored size: 396 Bytes

Contents

module Terrestrial
  module ShortInspectionString
    def inspect
      "\#<#{self.class.name}:#{self.object_id.<<(1).to_s(16)} " +
        inspectable_properties.map { |property|
          [
            property,
            instance_variable_get("@#{property}").inspect
          ].join("=")
        }
        .join(" ") + ">"
    end

    def inspectable_properties
      []
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
terrestrial-0.1.1 lib/terrestrial/short_inspection_string.rb