Module: Termline
- Defined in:
- lib/termline.rb,
lib/termline/msg.rb,
lib/termline/list.rb,
lib/termline/space.rb,
lib/termline/style.rb,
lib/termline/table.rb,
lib/termline/version.rb
Overview
Lesli
Copyright © 2026, Lesli Technologies, S. A.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see www.gnu.org/licenses/.
Lesli · Ruby on Rails SaaS Development Framework.
Made with ♥ by LesliTech Building a better future, one line of code at a time.
// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ // ·
Defined Under Namespace
Modules: List, Msg, Space, Style, Table
Constant Summary collapse
- VERSION =
"1.1.2"- BUILD =
"1777771350"
Class Method Summary collapse
- .alert(*messages) ⇒ Object
- .br(count = 1) ⇒ Object
- .color(color) ⇒ Object
- .danger(*messages, tag: 'DANGER:', icon: :error, time: true, **data) ⇒ Object
- .deprecation(message) ⇒ Object
- .info(*messages, tag: 'INFO:', icon: :info, time: true, **data) ⇒ Object
- .line(count = 8) ⇒ Object
- .list(*items, color: :default, icon: :debug) ⇒ Object
- .m(*messages) ⇒ Object
- .msg(*messages, **data) ⇒ Object
- .success(*messages, tag: 'SUCCESS:', icon: :success, time: true, **data) ⇒ Object
- .table(data, header: true) ⇒ Object
- .warning(*messages, tag: 'WARNING:', icon: :warning, time: true, **data) ⇒ Object
Class Method Details
.alert(*messages) ⇒ Object
69 70 71 |
# File 'lib/termline.rb', line 69 def alert(*) .each { || puts(Termline::Msg.alert()) } end |
.br(count = 1) ⇒ Object
83 84 85 |
# File 'lib/termline.rb', line 83 def br(count=1) puts(Termline::Space.builder("\n", count)) end |
.color(color) ⇒ Object
91 92 93 |
# File 'lib/termline.rb', line 91 def color(color) Termline::Space.color(count) end |
.danger(*messages, tag: 'DANGER:', icon: :error, time: true, **data) ⇒ Object
65 66 67 |
# File 'lib/termline.rb', line 65 def danger(*, tag:'DANGER:', icon: :error, time:true, **data) .each { || puts(Termline::Msg.builder(, tag:tag, icon:icon, data:data, color: :red, time:time)) } end |
.deprecation(message) ⇒ Object
96 97 |
# File 'lib/termline.rb', line 96 def deprecation end |
.info(*messages, tag: 'INFO:', icon: :info, time: true, **data) ⇒ Object
53 54 55 |
# File 'lib/termline.rb', line 53 def info(*, tag:'INFO:', icon: :info, time:true, **data) .each { || puts(Termline::Msg.builder(, tag:tag, icon:icon, data:data, color: :blue, time:time)) } end |
.line(count = 8) ⇒ Object
87 88 89 |
# File 'lib/termline.rb', line 87 def line(count=8) puts(Termline::Space.builder('-·- ', count)) end |
.list(*items, color: :default, icon: :debug) ⇒ Object
74 75 76 |
# File 'lib/termline.rb', line 74 def list(*items, color: :default, icon: :debug) Termline::List.builder(items, color:color, icon:icon) end |
.m(*messages) ⇒ Object
45 46 47 |
# File 'lib/termline.rb', line 45 def m(*) .each { || puts() } end |
.msg(*messages, **data) ⇒ Object
49 50 51 |
# File 'lib/termline.rb', line 49 def msg(*, **data) .each { || puts(Termline::Msg.builder(, data:data)) } end |
.success(*messages, tag: 'SUCCESS:', icon: :success, time: true, **data) ⇒ Object
57 58 59 |
# File 'lib/termline.rb', line 57 def success(*, tag:'SUCCESS:', icon: :success, time:true, **data) .each { || puts(Termline::Msg.builder(, tag:tag, icon:icon, data:data, color: :green, time:time)) } end |