class Thinreports::Core::Shape::List::SectionInterface

Public Class Methods

new(parent, format, section_name) click to toggle source

@param [Thinreports::Core::Shape::List::Page] parent @param [Thinreports::Core::Shape::List::SectionFormat] format @param [Symbol] section_name

# File lib/thinreports/core/shape/list/section_interface.rb, line 16
def initialize(parent, format, section_name)
  super(parent, format)
  internal.section_name = section_name

  initialize_manager(format) do |f|
    Core::Shape::Interface(self, f)
  end
end

Public Instance Methods

copy(parent) click to toggle source

@param [Thinreports::Core::Shape::List::Page] parent @return [Thinreports::Core::Shape::List::SectionInterface]

# File lib/thinreports/core/shape/list/section_interface.rb, line 27
def copy(parent)
  new_sec = super
  new_sec.internal.section_name = internal.section_name

  manager.shapes.each do |id, shape|
    new_sec.manager.shapes[id] = shape.copy(new_sec)
  end
  new_sec
end

Private Instance Methods

init_internal(parent, format) click to toggle source

@param parent (see initialize) @param format (see initialize) @return [Thinreports::Core::Shape::List::SectionInternal]

# File lib/thinreports/core/shape/list/section_interface.rb, line 42
def init_internal(parent, format)
  List::SectionInternal.new(parent, format)
end