Sha256: 2723d0dfb3e97a37e64f4d6b6f74b49b771f5c7d05f2350d835076ed8705c6bc

Contents?: true

Size: 450 Bytes

Versions: 5

Compression:

Stored size: 450 Bytes

Contents

module Lazydoc
  
  # A special type of self-resolving Comment that whose to_s returns the
  # trailer, or an empty string if trailer is nil.
  #
  #   t = Trailer.new
  #   t.subject = "def method  # trailer string"
  #   t.to_s               # => "trailer string"
  #
  class Trailer < Comment
    
    # Self-resolves and returns trailer, or an empty 
    # string if trailer is nil.
    def to_s
      resolve
      trailer.to_s
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
lazydoc-1.0 lib/lazydoc/trailer.rb
lazydoc-0.3.1 lib/lazydoc/trailer.rb
lazydoc-0.3.0 lib/lazydoc/trailer.rb
lazydoc-0.9.0 lib/lazydoc/trailer.rb
lazydoc-0.8.0 lib/lazydoc/trailer.rb