Class: Rack::Markdown

Inherits:
Object
  • Object
show all
Includes:
CSS, HTML
Defined in:
lib/rack/markdown/markdown.rb,
lib/rack/markdown.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from HTML

#body, #html

Methods included from CSS

#external, #internal

Constructor Details

#initialize(path) ⇒ Markdown

Returns a new instance of Markdown.



5
6
7
# File 'lib/rack/markdown/markdown.rb', line 5

def initialize(path)
  @path = path
end

Instance Attribute Details

#pathObject (readonly)

Returns the value of attribute path.



3
4
5
# File 'lib/rack/markdown/markdown.rb', line 3

def path
  @path
end

Class Method Details

.versionObject



13
14
15
# File 'lib/rack/markdown/markdown.rb', line 13

def self.version
  '0.0.3'
end

Instance Method Details

#call(env) ⇒ Object



9
10
11
# File 'lib/rack/markdown/markdown.rb', line 9

def call(env)
  [200, { 'Content-Type' => 'text/html' }, [html]]
end