Class: AboutComponent
- Inherits:
-
ViewComponent::Base
- Object
- ViewComponent::Base
- AboutComponent
- Defined in:
- app/components/about_component.rb
Instance Method Summary collapse
-
#initialize(text: "", title: nil, system_text: nil) ⇒ AboutComponent
constructor
A new instance of AboutComponent.
Constructor Details
#initialize(text: "", title: nil, system_text: nil) ⇒ AboutComponent
4 5 6 7 8 9 10 11 |
# File 'app/components/about_component.rb', line 4 def initialize(text: "", title: nil, system_text: nil) @title = title arr = text.split("\n") arr += system_text ? system_text.split("\n") : system_default arr << "Time #{Time.now.localtime}" @lines = arr.flatten end |