Module: Takagi::Branding
- Defined in:
- lib/takagi/branding.rb
Overview
Branding and visual identity for Takagi
Constant Summary collapse
- WAVE =
Japanese wave symbol - represents observables, events, and flow
'波'- LOGO =
"[#{WAVE}]"- LOGO_WITH_NAME =
Styled logo with name
"#{LOGO} Takagi"- BANNER =
ASCII art banner for server startup
<<~BANNER ╔═══════════════════════════════════╗ ║ ║ ║ [#{WAVE}] T A K A G I ║ ║ ║ ║ CoAP Framework for Ruby ║ ║ ║ ╚═══════════════════════════════════╝ BANNER
- COMPACT_BANNER =
Compact banner for constrained terminals
<<~BANNER ═══════════════════════════════ [#{WAVE}] Takagi CoAP Framework ═══════════════════════════════ BANNER
- WAVE_LINE =
Wave pattern decorations
'〜' * 20
Class Method Summary collapse
-
.error(message) ⇒ String
Error prefix with wave.
-
.info(message) ⇒ String
Info prefix with wave.
-
.log(message) ⇒ String
Prefix for log messages.
-
.print_banner(compact: false) ⇒ Object
Print startup banner.
-
.print_version(version) ⇒ Object
Print version info.
-
.section(title) ⇒ String
Styled section header.
-
.success(message) ⇒ String
Success prefix with wave.
Class Method Details
.error(message) ⇒ String
Error prefix with wave
70 71 72 |
# File 'lib/takagi/branding.rb', line 70 def self.error() "#{LOGO} ERROR: #{}" end |
.info(message) ⇒ String
Info prefix with wave
84 85 86 |
# File 'lib/takagi/branding.rb', line 84 def self.info() "#{LOGO} #{}" end |
.log(message) ⇒ String
Prefix for log messages
39 40 41 |
# File 'lib/takagi/branding.rb', line 39 def self.log() "#{LOGO} #{}" end |
.print_banner(compact: false) ⇒ Object
Print startup banner
45 46 47 |
# File 'lib/takagi/branding.rb', line 45 def self.(compact: false) puts compact ? COMPACT_BANNER : BANNER end |
.print_version(version) ⇒ Object
Print version info
51 52 53 |
# File 'lib/takagi/branding.rb', line 51 def self.print_version(version) puts "#{LOGO_WITH_NAME} v#{version}" end |
.section(title) ⇒ String
Styled section header
58 59 60 61 62 63 64 65 |
# File 'lib/takagi/branding.rb', line 58 def self.section(title) <<~SECTION #{WAVE_LINE} #{LOGO} #{title} #{WAVE_LINE} SECTION end |
.success(message) ⇒ String
Success prefix with wave
77 78 79 |
# File 'lib/takagi/branding.rb', line 77 def self.success() "#{LOGO} ✓ #{}" end |