Class: Wikilink::Converter::Sites::RubyChina
- Inherits:
-
Wikilink::Converter::Site
- Object
- Wikilink::Converter::Site
- Wikilink::Converter::Sites::RubyChina
- Includes:
- HTMLAttributes, LinkHelper
- Defined in:
- lib/wikilink/converter/sites/ruby_china.rb
Direct Known Subclasses
Constant Summary
Constants inherited from Wikilink::Converter::Site
Wikilink::Converter::Site::CURRENT_SITE_NAME, Wikilink::Converter::Site::DEFAULT_NAMESPACE
Instance Attribute Summary
Attributes inherited from Wikilink::Converter::Site
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ RubyChina
constructor
A new instance of RubyChina.
- #run_namespace_node(run_options) ⇒ Object
- #run_namespace_topic(run_options) ⇒ Object
Methods included from HTMLAttributes
Methods included from LinkHelper
Methods inherited from Wikilink::Converter::Site
#default_namespace, #namespace, #run
Methods included from ArgumentExtractor
Constructor Details
#initialize(options = {}) ⇒ RubyChina
Returns a new instance of RubyChina.
11 12 13 14 15 16 17 18 19 20 |
# File 'lib/wikilink/converter/sites/ruby_china.rb', line 11 def initialize( = {}) if [:name] == CURRENT_SITE [:domain] ||= '/' else [:domain] ||= 'http://ruby-china.org/' end [:prefix] = "#{[:domain]}wiki/" super() end |
Instance Method Details
#run_namespace_node(run_options) ⇒ Object
27 28 29 30 |
# File 'lib/wikilink/converter/sites/ruby_china.rb', line 27 def run_namespace_node() path = "#{[:domain]}topics/node#{[:path]}" link_to [:name], path, :class => html_class([:class]) end |
#run_namespace_topic(run_options) ⇒ Object
22 23 24 25 |
# File 'lib/wikilink/converter/sites/ruby_china.rb', line 22 def run_namespace_topic() path = "#{[:domain]}topics/#{[:path]}" link_to [:name], path, :class => html_class([:class]) end |