Module: Fog::Formatador
- Defined in:
- lib/fog/formatador.rb
Overview
Fog::Formatador
Constant Summary collapse
- PARSE_REGEX =
::Formatador::PARSE_REGEX
- STYLES =
::Formatador::STYLES
- INDENT_REGEX =
::Formatador::INDENT_REGEX
Class Method Summary collapse
- .display_compact_table(hashes, keys = nil, &block) ⇒ Object
- .display_line(data) ⇒ Object
- .display_lines(data) ⇒ Object
- .display_table(hashes, keys = nil, &block) ⇒ Object
- .format(object, opts = { :include_nested => true }) ⇒ Object
- .formatador ⇒ Object
- .redisplay_progressbar(current, total, options = {}) ⇒ Object
Class Method Details
.display_compact_table(hashes, keys = nil, &block) ⇒ Object
26 27 28 |
# File 'lib/fog/formatador.rb', line 26 def self.display_compact_table(hashes, keys = nil, &block) ::Formatador.display_compact_table(hashes, keys, &block) end |
.display_line(data) ⇒ Object
18 19 20 |
# File 'lib/fog/formatador.rb', line 18 def self.display_line(data) ::Formatador.display_line(data) end |
.display_lines(data) ⇒ Object
22 23 24 |
# File 'lib/fog/formatador.rb', line 22 def self.display_lines(data) ::Formatador.display_lines(data) end |
.display_table(hashes, keys = nil, &block) ⇒ Object
30 31 32 |
# File 'lib/fog/formatador.rb', line 30 def self.display_table(hashes, keys = nil, &block) ::Formatador.display_table(hashes, keys, &block) end |
.format(object, opts = { :include_nested => true }) ⇒ Object
12 13 14 15 16 |
# File 'lib/fog/formatador.rb', line 12 def self.format(object, opts = { :include_nested => true }) string = init_string(object) indent { string << object_string(object, opts) } string << "#{indentation}>" end |
.formatador ⇒ Object
8 9 10 |
# File 'lib/fog/formatador.rb', line 8 def self.formatador Thread.current[:formatador] ||= ::Formatador.new end |
.redisplay_progressbar(current, total, options = {}) ⇒ Object
34 35 36 |
# File 'lib/fog/formatador.rb', line 34 def self.(current, total, = {}) ::Formatador.(current, total, = {}) end |