Class: ThinReports::Core::Shape::List::SectionInterface

Inherits:
Base::Interface show all
Includes:
Manager::Target
Defined in:
lib/thinreports/core/shape/list/section_interface.rb

Instance Attribute Summary

Attributes included from Manager::Target

#manager

Attributes inherited from Base::Interface

#internal

Instance Method Summary collapse

Methods included from Manager::Target

#item, #item_exists?, #items, #list, #values

Constructor Details

#initialize(parent, format, section_name) ⇒ SectionInterface

Returns a new instance of SectionInterface.

Parameters:



15
16
17
18
19
20
21
22
# File 'lib/thinreports/core/shape/list/section_interface.rb', line 15

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

Instance Method Details

#copy(parent) ⇒ ThinReports::Core::Shape::List::SectionInterface



27
28
29
30
31
32
33
34
35
# 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