Sha256: a9e88b0c28040cb23fa671619580e66b6dc418187b3558ebcbf21255799c82c0
Contents?: true
Size: 561 Bytes
Versions: 11
Compression:
Stored size: 561 Bytes
Contents
require 'jsduck/util/null_object' require 'jsduck/util/io' module JsDuck class Welcome # Creates Welcome object from filename. def self.create(filename) if filename Welcome.new(filename) else Util::NullObject.new(:to_html => "") end end # Parses welcome HTML file with content for welcome page. def initialize(filename) @html = Util::IO.read(filename) end # Returns the HTML def to_html(style="") "<div id='welcome-content' style='#{style}'>#{@html}</div>" end end end
Version data entries
11 entries across 11 versions & 1 rubygems