Sha256: 908fa168bc3b5b1273e0087bb4000820a3f8461fe54ff42fd7fd55228ce0998a

Contents?: true

Size: 284 Bytes

Versions: 3

Compression:

Stored size: 284 Bytes

Contents

module Gnomika
  class Quote
    attr_reader :content, :author

    def initialize(content, author)
      @content = content
      @author = author
    end

    def to_s
      str = "#{@content}"
      str << "\n  - #{@author}" unless @author.strip.empty?
      str
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
gnomikologikon-fortune-1.0.3 lib/gnomikologikon/quote.rb
gnomikologikon-fortune-1.0.2 lib/gnomikologikon/quote.rb
gnomikologikon-fortune-1.0.1 lib/gnomikologikon/quote.rb