Class: TerminalLayout::BlockRenderObject

Inherits:
RenderObject show all
Defined in:
lib/terminal_layout.rb

Direct Known Subclasses

FloatRenderObject

Instance Attribute Summary

Attributes inherited from RenderObject

#box, #children, #content, #parent, #style

Instance Method Summary collapse

Methods inherited from RenderObject

#ending_x_for_current_y, #height, #inspect, #layout, #layout_float, #offset, #position, #render, #render_object_for, #size, #starting_x_for_current_y, #to_s, #to_str, #width

Methods included from EventEmitter

#_callbacks, #emit, #on, #unsubscribe

Constructor Details

#initialize(*args) ⇒ BlockRenderObject

Returns a new instance of BlockRenderObject.



302
303
304
305
306
# File 'lib/terminal_layout.rb', line 302

def initialize(*args)
  super
  style.has_key?(:display) || style[:display] = :block
  style.has_key?(:width) || style[:width] = @box.width
end