Class: AnnotateRb::ModelAnnotator::Annotation::SchemaHeader::DatabaseName

Inherits:
Components::Base
  • Object
show all
Defined in:
lib/annotate_rb/model_annotator/annotation/schema_header.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Components::Base

#to_rdoc, #to_yard

Constructor Details

#initialize(name) ⇒ DatabaseName

Returns a new instance of DatabaseName.



26
27
28
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 26

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



24
25
26
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 24

def name
  @name
end

Instance Method Details

#to_defaultObject



30
31
32
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 30

def to_default
  "# Database name: #{name}"
end

#to_markdownObject



34
35
36
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 34

def to_markdown
  "# Database name: `#{name}`"
end