Class: MarkdownRubyDocumentation::MethodLinker

Inherits:
Object
  • Object
show all
Defined in:
lib/markdown_ruby_documentation/method_linker.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(section_key:, root_path:) ⇒ MethodLinker

Returns a new instance of MethodLinker.



6
7
8
9
# File 'lib/markdown_ruby_documentation/method_linker.rb', line 6

def initialize(section_key:, root_path:)
  @section_key = section_key
  @root_path   = root_path
end

Instance Attribute Details

#root_pathObject (readonly)

Returns the value of attribute root_path.



4
5
6
# File 'lib/markdown_ruby_documentation/method_linker.rb', line 4

def root_path
  @root_path
end

#section_keyObject (readonly)

Returns the value of attribute section_key.



4
5
6
# File 'lib/markdown_ruby_documentation/method_linker.rb', line 4

def section_key
  @section_key
end

#textObject (readonly)

Returns the value of attribute text.



4
5
6
# File 'lib/markdown_ruby_documentation/method_linker.rb', line 4

def text
  @text
end

Instance Method Details

#call(text = nil) ⇒ Object



11
12
13
14
# File 'lib/markdown_ruby_documentation/method_linker.rb', line 11

def call(text=nil)
  @text        = text
  generate
end