Class: AnnotateRb::ModelAnnotator::Annotation::SchemaHeader::TableName

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) ⇒ TableName

Returns a new instance of TableName.



10
11
12
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 10

def initialize(name)
  @name = name
end

Instance Attribute Details

#nameObject (readonly)

Returns the value of attribute name.



8
9
10
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 8

def name
  @name
end

Instance Method Details

#to_defaultObject



14
15
16
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 14

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

#to_markdownObject



18
19
20
# File 'lib/annotate_rb/model_annotator/annotation/schema_header.rb', line 18

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