Class: RevealCK::Commands::PrintBanner
- Inherits:
-
Object
- Object
- RevealCK::Commands::PrintBanner
- Defined in:
- lib/reveal-ck/commands/print_banner.rb
Overview
The idea of displaying a banner via an injected ui. Messages sent explain everything to do with the serve command (listening, reloading, and webserving)
Instance Attribute Summary collapse
-
#doc_root ⇒ Object
readonly
Returns the value of attribute doc_root.
-
#host ⇒ Object
readonly
Returns the value of attribute host.
-
#port ⇒ Object
readonly
Returns the value of attribute port.
-
#slides_file ⇒ Object
readonly
Returns the value of attribute slides_file.
-
#ui ⇒ Object
readonly
Returns the value of attribute ui.
Instance Method Summary collapse
-
#initialize(doc_root, port, host, slides_file, ui) ⇒ PrintBanner
constructor
A new instance of PrintBanner.
- #run ⇒ Object
Constructor Details
#initialize(doc_root, port, host, slides_file, ui) ⇒ PrintBanner
Returns a new instance of PrintBanner.
8 9 10 11 12 13 14 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 8 def initialize(doc_root, port, host, , ui) @doc_root = doc_root @port = port @host = host @slides_file = @ui = ui end |
Instance Attribute Details
#doc_root ⇒ Object (readonly)
Returns the value of attribute doc_root.
7 8 9 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 7 def doc_root @doc_root end |
#host ⇒ Object (readonly)
Returns the value of attribute host.
7 8 9 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 7 def host @host end |
#port ⇒ Object (readonly)
Returns the value of attribute port.
7 8 9 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 7 def port @port end |
#slides_file ⇒ Object (readonly)
Returns the value of attribute slides_file.
7 8 9 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 7 def @slides_file end |
#ui ⇒ Object (readonly)
Returns the value of attribute ui.
7 8 9 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 7 def ui @ui end |
Instance Method Details
#run ⇒ Object
16 17 18 19 20 21 22 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 16 def run ui.separator ui. "Serving up slide content in '#{doc_root}/'." ui. "Open your browser to 'http://#{host}:#{port}'." ui. 'Press CTRL-C to stop.' ui.separator end |