Class: TextilePlugin
- Inherits:
-
Henshin::Generator
- Object
- Henshin::StandardPlugin
- Henshin::Generator
- TextilePlugin
- Defined in:
- lib/henshin/plugins/textile.rb
Constant Summary collapse
- Defaults =
{}
Instance Attribute Summary collapse
-
#config ⇒ Object
Returns the value of attribute config.
-
#extensions ⇒ Object
Returns the value of attribute extensions.
Instance Method Summary collapse
- #generate(content) ⇒ Object
-
#initialize(override = {}) ⇒ TextilePlugin
constructor
A new instance of TextilePlugin.
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
#config ⇒ Object
Returns the value of attribute config.
6 7 8 |
# File 'lib/henshin/plugins/textile.rb', line 6 def config @config end |
#extensions ⇒ Object
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 |