Class: ClassMetrix::Formatters::Components::FooterComponent
- Inherits:
-
Object
- Object
- ClassMetrix::Formatters::Components::FooterComponent
- Defined in:
- lib/class_metrix/formatters/components/footer_component.rb
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(options = {}) ⇒ FooterComponent
constructor
A new instance of FooterComponent.
Constructor Details
#initialize(options = {}) ⇒ FooterComponent
Returns a new instance of FooterComponent.
7 8 9 10 11 12 13 14 |
# File 'lib/class_metrix/formatters/components/footer_component.rb', line 7 def initialize( = {}) @options = @show_footer = .fetch(:show_footer, true) @custom_footer = [:custom_footer] @show_timestamp = .fetch(:show_timestamp, false) @show_separator = .fetch(:show_separator, true) @footer_style = .fetch(:footer_style, :default) # :default, :minimal, :detailed end |
Instance Method Details
#generate ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
# File 'lib/class_metrix/formatters/components/footer_component.rb', line 16 def generate return [] unless @show_footer output = [] # : Array[String] # Add separator line output << "---" if @show_separator case @footer_style when :minimal output << "*Generated by ClassMetrix*" when :detailed output.concat() else output.concat() end output end |