Class: Wikilink::Converter::Namespace

Inherits:
Object
  • Object
show all
Includes:
HTMLAttributes, LinkHelper
Defined in:
lib/wikilink/converter/namespace.rb

Overview

Namespace converter

Direct Known Subclasses

Default

Defined Under Namespace

Classes: Default

Constant Summary collapse

DEFAULT_NAME =
''

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from HTMLAttributes

#html_class

Methods included from LinkHelper

#link_to

Constructor Details

#initialize(options = {}) ⇒ Namespace

Returns a new instance of Namespace.



15
16
17
# File 'lib/wikilink/converter/namespace.rb', line 15

def initialize(options = {})
  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



13
14
15
# File 'lib/wikilink/converter/namespace.rb', line 13

def options
  @options
end

Instance Method Details

#config(&block) ⇒ Object



19
20
21
22
# File 'lib/wikilink/converter/namespace.rb', line 19

def config(&block)
  @block = block
  self
end

#run(run_options) ⇒ Object



24
25
26
27
28
# File 'lib/wikilink/converter/namespace.rb', line 24

def run(run_options)
  if @block
    instance_exec(run_options, &@block)
  end
end