Class: Thinreports::BasicReport::Core::Shape::PageNumber::Format

Inherits:
Basic::Format show all
Defined in:
lib/thinreports/basic_report/core/shape/page_number/format.rb

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Basic::Format

#affect_bottom_margin?

Methods included from Utils

#blank_value?, #call_block_in, #deep_copy, included

Methods inherited from Format::Base

#attributes, config_accessor, config_checker, config_reader, config_writer, #initialize

Constructor Details

This class inherits a constructor from Thinreports::BasicReport::Core::Format::Base

Class Method Details

.next_default_idObject



23
24
25
26
# File 'lib/thinreports/basic_report/core/shape/page_number/format.rb', line 23

def self.next_default_id
  @id_counter ||= 0
  "__pageno#{@id_counter += 1}"
end

Instance Method Details

#for_report?Boolean

Returns:

  • (Boolean)


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

def for_report?
  blank_value?(target)
end

#idObject



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

def id
  @id ||= blank_value?(read('id')) ? self.class.next_default_id : read('id')
end