Class: Thinreports::BasicReport::Report::BlankPage

Inherits:
Object
  • Object
show all
Defined in:
lib/thinreports/basic_report/report/page.rb

Direct Known Subclasses

Page

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(count = nil) ⇒ BlankPage

Returns a new instance of BlankPage.

Parameters:

  • count (Boolean) (defaults to: nil)

    (nil)



17
18
19
# File 'lib/thinreports/basic_report/report/page.rb', line 17

def initialize(count = nil)
  @count = count.nil? ? true : count
end

Instance Attribute Details

#noInteger

Examples:

3.times do
  page = report.start_new_page
  puts page.no
end
# => 1, 2, 3

Returns:

  • (Integer)


14
15
16
# File 'lib/thinreports/basic_report/report/page.rb', line 14

def no
  @no
end

Instance Method Details

#blank?Boolean

Returns (true).

Returns:

  • (Boolean)

    (true)



33
34
35
# File 'lib/thinreports/basic_report/report/page.rb', line 33

def blank?
  true
end

#count?Boolean

Examples:

page = report.start_new_page
page.count? # => true

page = report.start_new_page count: false
page.count? # => false

Returns:

  • (Boolean)


28
29
30
# File 'lib/thinreports/basic_report/report/page.rb', line 28

def count?
  @count
end