Class: Richcss::RichUI
- Inherits:
-
Object
- Object
- Richcss::RichUI
- Includes:
- Molinillo::UI
- Defined in:
- lib/richcss/richcss_ui.rb
Instance Method Summary collapse
- #after_resolution ⇒ Object
- #before_resolution ⇒ Object
-
#debug(depth = 0) ⇒ void
Conveys debug information to the user.
- #debug? ⇒ Boolean
- #indicate_progress ⇒ Object
Instance Method Details
#after_resolution ⇒ Object
27 28 29 |
# File 'lib/richcss/richcss_ui.rb', line 27 def after_resolution puts "" end |
#before_resolution ⇒ Object
22 23 24 25 |
# File 'lib/richcss/richcss_ui.rb', line 22 def before_resolution STDOUT.print "Resolving dependencies..." STDOUT.flush end |
#debug(depth = 0) ⇒ void
This method returns an undefined value.
Conveys debug information to the user.
10 11 12 13 14 15 16 |
# File 'lib/richcss/richcss_ui.rb', line 10 def debug(depth = 0) if debug? debug_info = yield debug_info = debug_info.inspect unless debug_info.is_a?(String) STDERR.puts debug_info.split("\n").map {|s| " " * depth + s } end end |
#debug? ⇒ Boolean
18 19 20 |
# File 'lib/richcss/richcss_ui.rb', line 18 def debug? ENV["DEBUG_RESOLVER"] || ENV["DEBUG_RESOLVER_TREE"] end |
#indicate_progress ⇒ Object
31 32 33 34 |
# File 'lib/richcss/richcss_ui.rb', line 31 def indicate_progress STDOUT.print "." STDOUT.flush end |