Module: Softcover::Output
- Included in:
- Book, Builders::Epub, Builders::Pdf, Commands::Build, Commands::Generator, Commands::Publisher, Commands::Server
- Defined in:
- lib/softcover/output.rb
Class Attribute Summary collapse
-
.silent ⇒ Object
Returns the value of attribute silent.
-
.stream ⇒ Object
Returns the value of attribute stream.
-
.verbosity_level ⇒ Object
Returns the value of attribute verbosity_level.
Class Method Summary collapse
Instance Method Summary collapse
Class Attribute Details
.silent ⇒ Object
Returns the value of attribute silent.
3 4 5 |
# File 'lib/softcover/output.rb', line 3 def silent @silent end |
.stream ⇒ Object
Returns the value of attribute stream.
3 4 5 |
# File 'lib/softcover/output.rb', line 3 def stream @stream end |
.verbosity_level ⇒ Object
Returns the value of attribute verbosity_level.
3 4 5 |
# File 'lib/softcover/output.rb', line 3 def verbosity_level @verbosity_level end |
Class Method Details
.should_output?(level) ⇒ Boolean
21 22 23 24 |
# File 'lib/softcover/output.rb', line 21 def should_output?(level) !silent? || !(level && defined?(@verbosity_level) && level < @verbosity_level) end |
.silence! ⇒ Object
9 10 11 |
# File 'lib/softcover/output.rb', line 9 def silence! @silent = true end |
.silent? ⇒ Boolean
17 18 19 |
# File 'lib/softcover/output.rb', line 17 def silent? defined?(@silent) && @silent end |
.unsilence! ⇒ Object
13 14 15 |
# File 'lib/softcover/output.rb', line 13 def unsilence! @silent = false end |
Instance Method Details
#system(cmd) ⇒ Object
35 36 37 38 |
# File 'lib/softcover/output.rb', line 35 def system(cmd) output = `#{cmd}` puts output end |