Class: Thinreports::BasicReport::Core::Shape::List::SectionInterface

Inherits:
Base::Interface
  • Object
show all
Includes:
Manager::Target
Defined in:
lib/thinreports/basic_report/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?, #list, #values

Methods included from Utils

#blank_value?, #call_block_in, #deep_copy, included

Constructor Details

#initialize(parent, format, section_name) ⇒ SectionInterface

Returns a new instance of SectionInterface.



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

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::BasicReport::Core::Shape::List::SectionInterface



28
29
30
31
32
33
34
35
36
# File 'lib/thinreports/basic_report/core/shape/list/section_interface.rb', line 28

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