Module: Thinreports::BasicReport::Core::Shape

Defined in:
lib/thinreports/basic_report/core/shape.rb,
lib/thinreports/basic_report/core/shape/list.rb,
lib/thinreports/basic_report/core/shape/text.rb,
lib/thinreports/basic_report/core/shape/basic.rb,
lib/thinreports/basic_report/core/shape/list/page.rb,
lib/thinreports/basic_report/core/shape/stack_view.rb,
lib/thinreports/basic_report/core/shape/style/base.rb,
lib/thinreports/basic_report/core/shape/style/text.rb,
lib/thinreports/basic_report/core/shape/text_block.rb,
lib/thinreports/basic_report/core/shape/image_block.rb,
lib/thinreports/basic_report/core/shape/list/format.rb,
lib/thinreports/basic_report/core/shape/page_number.rb,
lib/thinreports/basic_report/core/shape/style/basic.rb,
lib/thinreports/basic_report/core/shape/text/format.rb,
lib/thinreports/basic_report/core/shape/basic/format.rb,
lib/thinreports/basic_report/core/shape/list/manager.rb,
lib/thinreports/basic_report/core/shape/base/internal.rb,
lib/thinreports/basic_report/core/shape/style/graphic.rb,
lib/thinreports/basic_report/core/shape/text/internal.rb,
lib/thinreports/basic_report/core/shape/base/interface.rb,
lib/thinreports/basic_report/core/shape/basic/internal.rb,
lib/thinreports/basic_report/core/shape/manager/format.rb,
lib/thinreports/basic_report/core/shape/manager/target.rb,
lib/thinreports/basic_report/core/shape/text/interface.rb,
lib/thinreports/basic_report/core/shape/basic/interface.rb,
lib/thinreports/basic_report/core/shape/list/page_state.rb,
lib/thinreports/basic_report/core/shape/manager/internal.rb,
lib/thinreports/basic_report/core/shape/stack_view/format.rb,
lib/thinreports/basic_report/core/shape/text_block/format.rb,
lib/thinreports/basic_report/core/shape/basic/block_format.rb,
lib/thinreports/basic_report/core/shape/image_block/format.rb,
lib/thinreports/basic_report/core/shape/page_number/format.rb,
lib/thinreports/basic_report/core/shape/list/section_format.rb,
lib/thinreports/basic_report/core/shape/stack_view/internal.rb,
lib/thinreports/basic_report/core/shape/text_block/internal.rb,
lib/thinreports/basic_report/core/shape/basic/block_internal.rb,
lib/thinreports/basic_report/core/shape/image_block/internal.rb,
lib/thinreports/basic_report/core/shape/page_number/internal.rb,
lib/thinreports/basic_report/core/shape/stack_view/interface.rb,
lib/thinreports/basic_report/core/shape/text_block/formatter.rb,
lib/thinreports/basic_report/core/shape/text_block/interface.rb,
lib/thinreports/basic_report/core/shape/basic/block_interface.rb,
lib/thinreports/basic_report/core/shape/image_block/interface.rb,
lib/thinreports/basic_report/core/shape/list/section_internal.rb,
lib/thinreports/basic_report/core/shape/page_number/interface.rb,
lib/thinreports/basic_report/core/shape/stack_view/row_format.rb,
lib/thinreports/basic_report/core/shape/list/section_interface.rb,
lib/thinreports/basic_report/core/shape/text_block/formatter/basic.rb,
lib/thinreports/basic_report/core/shape/text_block/formatter/number.rb,
lib/thinreports/basic_report/core/shape/text_block/formatter/padding.rb,
lib/thinreports/basic_report/core/shape/text_block/formatter/datetime.rb

Defined Under Namespace

Modules: Base, Basic, ImageBlock, List, Manager, PageNumber, StackView, Style, Text, TextBlock

Class Method Summary collapse

Class Method Details

.find_by_type(type) ⇒ Object



17
18
19
20
21
22
23
24
25
26
27
28
29
# File 'lib/thinreports/basic_report/core/shape.rb', line 17

def self.find_by_type(type)
  case type
  when TextBlock::TYPE_NAME  then TextBlock
  when ImageBlock::TYPE_NAME then ImageBlock
  when List::TYPE_NAME       then List
  when StackView::TYPE_NAME  then StackView
  when Text::TYPE_NAME       then Text
  when PageNumber::TYPE_NAME then PageNumber
  when *Basic::TYPE_NAMES    then Basic
  else
    raise Thinreports::BasicReport::Errors::UnknownShapeType
  end
end

.Format(type) ⇒ Object



11
12
13
# File 'lib/thinreports/basic_report/core/shape.rb', line 11

def Format(type)
  find_by_type(type)::Format
end

.Interface(parent, format) ⇒ Object



7
8
9
# File 'lib/thinreports/basic_report/core/shape.rb', line 7

def Interface(parent, format)
  find_by_type(format.type)::Interface.new(parent, format)
end