Class: TextilePlugin

Inherits:
Henshin::Generator show all
Defined in:
lib/henshin/plugins/textile.rb

Constant Summary collapse

Defaults =
{}

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(override = {}) ⇒ TextilePlugin

Returns a new instance of TextilePlugin.



10
11
12
13
14
# File 'lib/henshin/plugins/textile.rb', line 10

def initialize( override={} )
  @extensions = {:input => ['textile'],
                 :output => 'html'}
  @config = Defaults.merge(override)
end

Instance Attribute Details

#configObject

Returns the value of attribute config.



6
7
8
# File 'lib/henshin/plugins/textile.rb', line 6

def config
  @config
end

#extensionsObject

Returns the value of attribute extensions.



6
7
8
# File 'lib/henshin/plugins/textile.rb', line 6

def extensions
  @extensions
end

Instance Method Details

#generate(content) ⇒ Object



16
17
18
# File 'lib/henshin/plugins/textile.rb', line 16

def generate( content )
  RedCloth.new(content).to_html
end