Module: PoliPage::PageFormat

Defined in:
lib/poli_page/models/page_format.rb

Overview

Valid ‘format:` strings for the rendering endpoints (sdk-specification.md §4.1). Ruby has no native enum; a frozen Set of strings is the most idiomatic representation and matches the wire format directly. The set is used both for input validation (in resource methods) and for documentation.

Constant Summary collapse

FORMATS =
Set[
  "A3", "A4", "A5", "A6",
  "Letter", "Legal", "Tabloid",
  "Executive", "B4", "B5",
  "Statement", "Folio"
].freeze

Class Method Summary collapse

Class Method Details

.valid?(value) ⇒ Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/poli_page/models/page_format.rb', line 19

def valid?(value)
  FORMATS.include?(value)
end