Class: PREP::Core::Page
- Inherits:
-
Object
- Object
- PREP::Core::Page
- Defined in:
- lib/core/page.rb
Overview
ページ設定を保持するクラス
Constant Summary collapse
- SIZES =
ページサイズの設定種別
{ :a5 => HPDFDoc::HPDF_PAGE_SIZE_A5, # A5 :a4 => HPDFDoc::HPDF_PAGE_SIZE_A4, # A4 :a3 => HPDFDoc::HPDF_PAGE_SIZE_A3, # A3 }
- ORIENTATIONS =
ページ方向の設定種別
{ :portrait => HPDFDoc::HPDF_PAGE_PORTRAIT, # 縦 :landscape => HPDFDoc::HPDF_PAGE_LANDSCAPE, # 横 }
Instance Attribute Summary collapse
-
#footer_height ⇒ Object
Returns the value of attribute footer_height.
-
#header_height ⇒ Object
Returns the value of attribute header_height.
-
#margin ⇒ Object
Returns the value of attribute margin.
-
#orientation ⇒ Object
Returns the value of attribute orientation.
-
#size ⇒ Object
Returns the value of attribute size.
Instance Method Summary collapse
-
#initialize ⇒ Page
constructor
初期化.
Constructor Details
#initialize ⇒ Page
初期化
31 32 33 34 35 36 37 38 39 40 41 42 |
# File 'lib/core/page.rb', line 31 def initialize @size = SIZES[:a4] @orientation = ORIENTATIONS[:portrate] @margin = { :top => 0, :left => 0, :bottom => 0, :right => 0 } @header_height = 0 @footer_height = 0 end |
Instance Attribute Details
#footer_height ⇒ Object
Returns the value of attribute footer_height.
28 29 30 |
# File 'lib/core/page.rb', line 28 def @footer_height end |
#header_height ⇒ Object
Returns the value of attribute header_height.
28 29 30 |
# File 'lib/core/page.rb', line 28 def header_height @header_height end |
#margin ⇒ Object
Returns the value of attribute margin.
28 29 30 |
# File 'lib/core/page.rb', line 28 def margin @margin end |
#orientation ⇒ Object
Returns the value of attribute orientation.
28 29 30 |
# File 'lib/core/page.rb', line 28 def orientation @orientation end |
#size ⇒ Object
Returns the value of attribute size.
28 29 30 |
# File 'lib/core/page.rb', line 28 def size @size end |