Sha256: 0db8603a692389634928532a03da9cee7c98a11885a2baa74af17fa27c4f1857

Contents?: true

Size: 490 Bytes

Versions: 2

Compression:

Stored size: 490 Bytes

Contents

# frozen_string_literal: true
module YARD::CodeObjects
  register_separator NSEP, :constant

  # A +ConstantObject+ represents a Ruby constant (not a module or class).
  # To access the constant's (source code) value, use {#value}.
  class ConstantObject < Base
    # The source code representing the constant's value
    # @return [String] the value the constant is set to
    attr_reader :value

    def value=(value)
      @value = format_source(value)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
yard-0.9.18 lib/yard/code_objects/constant_object.rb
yard-0.9.17 lib/yard/code_objects/constant_object.rb