Class: Postscript::Model::Program::Header
- Inherits:
-
Object
- Object
- Postscript::Model::Program::Header
- Defined in:
- lib/postscript/model/program.rb
Overview
DSC header: structured document structuring comments.
Instance Attribute Summary collapse
-
#bounding_box ⇒ Object
readonly
Returns the value of attribute bounding_box.
-
#creation_date ⇒ Object
readonly
Returns the value of attribute creation_date.
-
#creator ⇒ Object
readonly
Returns the value of attribute creator.
-
#custom ⇒ Object
readonly
Returns the value of attribute custom.
-
#epsf ⇒ Object
readonly
Returns the value of attribute epsf.
-
#hires_bounding_box ⇒ Object
readonly
Returns the value of attribute hires_bounding_box.
-
#language_level ⇒ Object
readonly
Returns the value of attribute language_level.
-
#page_count ⇒ Object
readonly
Returns the value of attribute page_count.
-
#pages ⇒ Object
readonly
Returns the value of attribute pages.
-
#title ⇒ Object
readonly
Returns the value of attribute title.
Instance Method Summary collapse
-
#initialize(bounding_box: nil, hires_bounding_box: nil, title: nil, creator: nil, creation_date: nil, pages: nil, page_count: nil, epsf: false, language_level: nil, custom: {}) ⇒ Header
constructor
A new instance of Header.
- #to_h ⇒ Object
- #with(**overrides) ⇒ Object
Constructor Details
#initialize(bounding_box: nil, hires_bounding_box: nil, title: nil, creator: nil, creation_date: nil, pages: nil, page_count: nil, epsf: false, language_level: nil, custom: {}) ⇒ Header
Returns a new instance of Header.
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/postscript/model/program.rb', line 36 def initialize(bounding_box: nil, hires_bounding_box: nil, title: nil, creator: nil, creation_date: nil, pages: nil, page_count: nil, epsf: false, language_level: nil, custom: {}) @bounding_box = bounding_box @hires_bounding_box = hires_bounding_box @title = title @creator = creator @creation_date = creation_date @pages = pages @page_count = page_count @epsf = epsf @language_level = language_level @custom = custom.dup.freeze freeze end |
Instance Attribute Details
#bounding_box ⇒ Object (readonly)
Returns the value of attribute bounding_box.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def bounding_box @bounding_box end |
#creation_date ⇒ Object (readonly)
Returns the value of attribute creation_date.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def creation_date @creation_date end |
#creator ⇒ Object (readonly)
Returns the value of attribute creator.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def creator @creator end |
#custom ⇒ Object (readonly)
Returns the value of attribute custom.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def custom @custom end |
#epsf ⇒ Object (readonly)
Returns the value of attribute epsf.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def epsf @epsf end |
#hires_bounding_box ⇒ Object (readonly)
Returns the value of attribute hires_bounding_box.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def hires_bounding_box @hires_bounding_box end |
#language_level ⇒ Object (readonly)
Returns the value of attribute language_level.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def language_level @language_level end |
#page_count ⇒ Object (readonly)
Returns the value of attribute page_count.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def page_count @page_count end |
#pages ⇒ Object (readonly)
Returns the value of attribute pages.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def pages @pages end |
#title ⇒ Object (readonly)
Returns the value of attribute title.
32 33 34 |
# File 'lib/postscript/model/program.rb', line 32 def title @title end |
Instance Method Details
#to_h ⇒ Object
57 58 59 60 61 62 63 64 |
# File 'lib/postscript/model/program.rb', line 57 def to_h { bounding_box: bounding_box, hires_bounding_box: hires_bounding_box, title: title, creator: creator, creation_date: creation_date, pages: pages, page_count: page_count, epsf: epsf, language_level: language_level, custom: custom, } end |