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.



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

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

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



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

def options
  @options
end

Instance Method Details

#config(&block) ⇒ Object



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

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

#run(run_options) ⇒ Object



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

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