Class: Thinreports::BasicReport::Core::Shape::Basic::BlockInternal

Inherits:
Internal show all
Defined in:
lib/thinreports/basic_report/core/shape/basic/block_internal.rb

Direct Known Subclasses

ImageBlock::Internal, TextBlock::Internal

Instance Attribute Summary

Attributes inherited from Thinreports::BasicReport::Core::Shape::Base::Internal

#format, #parent, #states

Instance Method Summary collapse

Methods inherited from Internal

#identifier

Methods inherited from Thinreports::BasicReport::Core::Shape::Base::Internal

#copy, #initialize

Methods included from Utils

#blank_value?, #call_block_in, #deep_copy, included

Constructor Details

This class inherits a constructor from Thinreports::BasicReport::Core::Shape::Base::Internal

Instance Method Details

#read_valueObject Also known as: value



15
16
17
# File 'lib/thinreports/basic_report/core/shape/basic/block_internal.rb', line 15

def read_value
  states.key?(:value) ? states[:value] : format.value.dup
end

#real_valueObject



24
25
26
# File 'lib/thinreports/basic_report/core/shape/basic/block_internal.rb', line 24

def real_value
  read_value
end

#styleObject



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

def style
  @style ||= Style::Basic.new(format)
end

#type_of?(type_name) ⇒ Boolean

Returns:

  • (Boolean)


28
29
30
# File 'lib/thinreports/basic_report/core/shape/basic/block_internal.rb', line 28

def type_of?(type_name)
  type_name == :block
end

#write_value(val) ⇒ Object



20
21
22
# File 'lib/thinreports/basic_report/core/shape/basic/block_internal.rb', line 20

def write_value(val)
  states[:value] = val
end