class StrawberryDocument

Attributes

attributes[RW]

Public Class Methods

new(title:, attributes:) click to toggle source
# File lib/StrawberryDocument.rb, line 7
def initialize(title:, attributes:)
    @title = title
    @attributes = attributes
end

Public Instance Methods

render() click to toggle source
# File lib/StrawberryDocument.rb, line 12
def render
    result = ""
    result += @title
    result += "\n--------------------\n"
    @attributes.each do |key, value|
        result += key.to_s + " " + value.to_s + "\n"
    end
    result += generateDate
    puts result
    return result
end