class Luna::Formatters::Emoji
Public Instance Methods
allowed_cols()
click to toggle source
– Note: If the terminal is too small we just let it go. The total columns we allow is just a example –
# File lib/luna/rspec/formatters/emoji.rb, line 28 def allowed_cols return @allowed_cols if defined?(@allowed_cols) @allowed_cols ||= begin infi = Float::INFINITY size = IO.console&.winsize&.last size = size || infi size / 6 end end
start(_)
click to toggle source
# File lib/luna/rspec/formatters/emoji.rb, line 38 def start(_) @lines = 0 output.puts end
start_dump(_)
click to toggle source
# File lib/luna/rspec/formatters/emoji.rb, line 43 def start_dump(_) output.puts end
Private Instance Methods
newline_or_addup()
click to toggle source
– Determine if we should start a new line or keep on pushing out. Note: if the terminal is too small we just let it go until it's done. –
# File lib/luna/rspec/formatters/emoji.rb, line 54 def newline_or_addup unless @lines == allowed_cols return @lines += 1 end output.puts @lines = 1 end