Class: Thinreports::BasicReport::Core::Shape::Base::Internal Abstract

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Includes:
Utils
Defined in:
lib/thinreports/basic_report/core/shape/base/internal.rb

Overview

This class is abstract.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Utils

#blank_value?, #call_block_in, #deep_copy, included

Constructor Details

#initialize(parent, format) ⇒ Internal

Returns a new instance of Internal.



23
24
25
26
27
28
29
30
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 23

def initialize(parent, format)
  @parent = parent
  @format = format
  @states = {}
  @style = nil

  @finalized_attributes = nil
end

Instance Attribute Details

#formatObject (readonly)

Returns the value of attribute format.



19
20
21
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 19

def format
  @format
end

#parentObject (readonly)

Returns the value of attribute parent.



18
19
20
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 18

def parent
  @parent
end

#statesObject

Returns the value of attribute states.



21
22
23
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 21

def states
  @states
end

#styleObject

Raises:

  • (NotImplementedError)


32
33
34
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 32

def style
  raise NotImplementedError
end

Instance Method Details

#copy(new_parent, &block) ⇒ Object



36
37
38
39
40
41
42
43
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 36

def copy(new_parent, &block)
  new_internal = self.class.new(new_parent, format)
  new_internal.style = style.copy
  new_internal.states = deep_copy(states)

  block.call(new_internal) if block_given?
  new_internal
end

#type_of?Boolean

Returns:

  • (Boolean)

Raises:

  • (NotImplementedError)


45
46
47
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 45

def type_of?
  raise NotImplementedError
end