Class: SilkLayout::Layout::Context
- Inherits:
-
Object
- Object
- SilkLayout::Layout::Context
- Defined in:
- lib/silk_layout/layout/context.rb
Instance Attribute Summary collapse
-
#page_size ⇒ Object
readonly
Returns the value of attribute page_size.
-
#width ⇒ Object
readonly
Returns the value of attribute width.
Instance Method Summary collapse
-
#initialize(width:, page_size: nil) ⇒ Context
constructor
A new instance of Context.
- #viewport_width ⇒ Object
Constructor Details
#initialize(width:, page_size: nil) ⇒ Context
Returns a new instance of Context.
8 9 10 11 |
# File 'lib/silk_layout/layout/context.rb', line 8 def initialize(width:, page_size: nil) @width = width @page_size = page_size end |
Instance Attribute Details
#page_size ⇒ Object (readonly)
Returns the value of attribute page_size.
6 7 8 |
# File 'lib/silk_layout/layout/context.rb', line 6 def page_size @page_size end |
#width ⇒ Object (readonly)
Returns the value of attribute width.
6 7 8 |
# File 'lib/silk_layout/layout/context.rb', line 6 def width @width end |
Instance Method Details
#viewport_width ⇒ Object
13 14 15 |
# File 'lib/silk_layout/layout/context.rb', line 13 def width end |