Class: PrettyPrint::Group
Instance Attribute Summary (collapse)
-
- (Object) breakables
readonly
Returns the value of attribute breakables.
-
- (Object) depth
readonly
Returns the value of attribute depth.
Instance Method Summary (collapse)
- - (Object) break
- - (Boolean) break?
- - (Boolean) first?
-
- (Group) initialize(depth)
constructor
A new instance of Group.
Constructor Details
- (Group) initialize(depth)
A new instance of Group
285 286 287 288 289 |
# File 'lib/prettyprint.rb', line 285 def initialize(depth) @depth = depth @breakables = [] @break = false end |
Instance Attribute Details
- (Object) breakables (readonly)
Returns the value of attribute breakables
290 291 292 |
# File 'lib/prettyprint.rb', line 290 def breakables @breakables end |
- (Object) depth (readonly)
Returns the value of attribute depth
290 291 292 |
# File 'lib/prettyprint.rb', line 290 def depth @depth end |
Instance Method Details
- (Object) break
292 293 294 |
# File 'lib/prettyprint.rb', line 292 def break @break = true end |
- (Boolean) break?
296 297 298 |
# File 'lib/prettyprint.rb', line 296 def break? @break end |
- (Boolean) first?
300 301 302 303 304 305 306 307 |
# File 'lib/prettyprint.rb', line 300 def first? if defined? @first false else @first = false true end end |