Class: PrettyPrint::Group

Inherits:
Object show all
Defined in:
lib/extensions/mspec/mspec/pp.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(depth) ⇒ Group

Returns a new instance of Group.



330
331
332
333
334
# File 'lib/extensions/mspec/mspec/pp.rb', line 330

def initialize(depth)
  @depth = depth
  @breakables = []
  @break = false
end

Instance Attribute Details

#breakablesObject (readonly)

Returns the value of attribute breakables.



335
336
337
# File 'lib/extensions/mspec/mspec/pp.rb', line 335

def breakables
  @breakables
end

#depthObject (readonly)

Returns the value of attribute depth.



335
336
337
# File 'lib/extensions/mspec/mspec/pp.rb', line 335

def depth
  @depth
end

Instance Method Details

#breakObject



337
338
339
# File 'lib/extensions/mspec/mspec/pp.rb', line 337

def break
  @break = true
end

#break?Boolean

Returns:

  • (Boolean)


341
342
343
# File 'lib/extensions/mspec/mspec/pp.rb', line 341

def break?
  @break
end

#first?Boolean

Returns:

  • (Boolean)


345
346
347
348
349
350
351
352
# File 'lib/extensions/mspec/mspec/pp.rb', line 345

def first?
  if defined? @first
    false
  else
    @first = false
    true
  end
end