Class: Thinreports::BasicReport::Core::Shape::Base::Internal Abstract
- Inherits:
-
Object
- Object
- Thinreports::BasicReport::Core::Shape::Base::Internal
- Extended by:
- Forwardable
- Includes:
- Utils
- Defined in:
- lib/thinreports/basic_report/core/shape/base/internal.rb
Overview
This class is abstract.
Direct Known Subclasses
Thinreports::BasicReport::Core::Shape::Basic::Internal, List::SectionInternal
Instance Attribute Summary collapse
-
#format ⇒ Object
readonly
Returns the value of attribute format.
-
#parent ⇒ Object
readonly
Returns the value of attribute parent.
-
#states ⇒ Object
Returns the value of attribute states.
- #style ⇒ Object
Instance Method Summary collapse
- #copy(new_parent, &block) ⇒ Object
-
#initialize(parent, format) ⇒ Internal
constructor
A new instance of Internal.
- #type_of? ⇒ Boolean
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
#format ⇒ Object (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 |
#parent ⇒ Object (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 |
#states ⇒ Object
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 |
#style ⇒ Object
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
45 46 47 |
# File 'lib/thinreports/basic_report/core/shape/base/internal.rb', line 45 def type_of? raise NotImplementedError end |