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.
-
#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, slides_file, ui) ⇒ PrintBanner
constructor
A new instance of PrintBanner.
- #run ⇒ Object
Constructor Details
#initialize(doc_root, port, slides_file, ui) ⇒ PrintBanner
Returns a new instance of PrintBanner.
8 9 10 11 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 8 def initialize(doc_root, port, , ui) @doc_root, @port, @slides_file = doc_root, port, @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 |
#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
13 14 15 16 17 18 19 |
# File 'lib/reveal-ck/commands/print_banner.rb', line 13 def run ui.separator ui. "Serving up slide content in '#{doc_root}/'." ui. "Open your browser to 'http://localhost:#{port}'." ui. 'Press CTRL-C to stop.' ui.separator end |