Class: JsDuck::Welcome
- Inherits:
-
Object
- Object
- JsDuck::Welcome
- Defined in:
- lib/jsduck/welcome.rb
Class Method Summary collapse
-
.create(filename) ⇒ Object
Creates Welcome object from filename.
Instance Method Summary collapse
-
#initialize(filename) ⇒ Welcome
constructor
Parses welcome HTML file with content for welcome page.
-
#to_html ⇒ Object
Returns the HTML.
Constructor Details
Class Method Details
.create(filename) ⇒ Object
Creates Welcome object from filename.
8 9 10 11 12 13 14 |
# File 'lib/jsduck/welcome.rb', line 8 def self.create(filename) if filename Welcome.new(filename) else NullObject.new(:to_html => "") end end |
Instance Method Details
#to_html ⇒ Object
Returns the HTML
22 23 24 |
# File 'lib/jsduck/welcome.rb', line 22 def to_html "<div id='welcome-content' style='display:none'>#{@html}</div>" end |