Class: AnnotateRb::ModelAnnotator::Components::Header

Inherits:
Base
  • Object
show all
Defined in:
lib/annotate_rb/model_annotator/components.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#to_rdoc, #to_yard

Constructor Details

#initialize(header) ⇒ Header

Returns a new instance of Header.



49
50
51
# File 'lib/annotate_rb/model_annotator/components.rb', line 49

def initialize(header)
  @header = header
end

Instance Attribute Details

#headerObject (readonly)

Returns the value of attribute header.



47
48
49
# File 'lib/annotate_rb/model_annotator/components.rb', line 47

def header
  @header
end

Instance Method Details

#to_defaultObject



53
54
55
# File 'lib/annotate_rb/model_annotator/components.rb', line 53

def to_default
  "# #{header}"
end

#to_markdownObject



57
58
59
# File 'lib/annotate_rb/model_annotator/components.rb', line 57

def to_markdown
  "# ### #{header}"
end