Class: Udb::DocLink
- Inherits:
-
Object
- Object
- Udb::DocLink
- Defined in:
- lib/udb/doc_link.rb
Instance Method Summary collapse
-
#dst_link ⇒ String
Unique ID of the linked to normative rule.
-
#initialize(dst_link, db_obj) ⇒ DocLink
constructor
A new instance of DocLink.
-
#to_adoc ⇒ String
Asciidoc to create desired link.
Constructor Details
#initialize(dst_link, db_obj) ⇒ DocLink
Returns a new instance of DocLink.
37 38 39 40 41 42 |
# File 'lib/udb/doc_link.rb', line 37 def initialize(dst_link, db_obj) raise ArgumentError, "Need String but was passed a #{data.class}" unless dst_link.is_a?(String) @dst_link = dst_link raise ArgumentError, "Missing documentation link for #{db_obj.name} of kind #{db_obj.kind}" if @dst_link.nil? end |
Instance Method Details
#dst_link ⇒ String
Returns Unique ID of the linked to normative rule.
45 |
# File 'lib/udb/doc_link.rb', line 45 def dst_link = @dst_link |
#to_adoc ⇒ String
Returns Asciidoc to create desired link.
48 49 50 |
# File 'lib/udb/doc_link.rb', line 48 def to_adoc "<<#{@dst_link},#{@dst_link}>>" end |