Class: RideTheStreetcar::Console
- Inherits:
-
Object
- Object
- RideTheStreetcar::Console
- Includes:
- Streamlined::Renderable
- Defined in:
- lib/ride_the_streetcar/console.rb
Instance Method Summary collapse
- #debug(message) ⇒ Object
- #error(message) ⇒ Object
- #info(message) ⇒ Object
- #log(message) ⇒ Object
- #statements ⇒ Object
- #template ⇒ Object
- #warn(message) ⇒ Object
Instance Method Details
#debug(message) ⇒ Object
7 8 9 |
# File 'lib/ride_the_streetcar/console.rb', line 7 def debug() statements << { debug: } end |
#error(message) ⇒ Object
23 24 25 |
# File 'lib/ride_the_streetcar/console.rb', line 23 def error() statements << { error: } end |
#info(message) ⇒ Object
15 16 17 |
# File 'lib/ride_the_streetcar/console.rb', line 15 def info() statements << { info: } end |
#log(message) ⇒ Object
11 12 13 |
# File 'lib/ride_the_streetcar/console.rb', line 11 def log() statements << { log: } end |
#statements ⇒ Object
5 |
# File 'lib/ride_the_streetcar/console.rb', line 5 def statements = @statements ||= [] |
#template ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/ride_the_streetcar/console.rb', line 27 def template html -> { <<~HTML #{html_map(statements) do |statement| html -> { <<~HTML <sc-console #{html_attributes statement}></sc-console> HTML } end} HTML } end |
#warn(message) ⇒ Object
19 20 21 |
# File 'lib/ride_the_streetcar/console.rb', line 19 def warn() statements << { warn: } end |