Class: Krupuk::Configuration
- Inherits:
-
Object
- Object
- Krupuk::Configuration
- Defined in:
- lib/krupuk/configuration.rb
Instance Attribute Summary collapse
-
#card_height ⇒ Object
Returns the value of attribute card_height.
-
#card_width ⇒ Object
Returns the value of attribute card_width.
-
#columns ⇒ Object
Returns the value of attribute columns.
-
#cut_marks ⇒ Object
Returns the value of attribute cut_marks.
-
#margin ⇒ Object
Returns the value of attribute margin.
-
#page_layout ⇒ Object
Returns the value of attribute page_layout.
-
#page_size ⇒ Object
Returns the value of attribute page_size.
-
#rows ⇒ Object
Returns the value of attribute rows.
Instance Method Summary collapse
- #cards_per_sheet ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 15 16 17 |
# File 'lib/krupuk/configuration.rb', line 8 def initialize @card_width = 180 @card_height = 252 @margin = 18 @columns = 4 @rows = 2 @page_layout = :landscape @page_size = "LETTER" @cut_marks = true end |
Instance Attribute Details
#card_height ⇒ Object
Returns the value of attribute card_height.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def card_height @card_height end |
#card_width ⇒ Object
Returns the value of attribute card_width.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def card_width @card_width end |
#columns ⇒ Object
Returns the value of attribute columns.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def columns @columns end |
#cut_marks ⇒ Object
Returns the value of attribute cut_marks.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def cut_marks @cut_marks end |
#margin ⇒ Object
Returns the value of attribute margin.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def margin @margin end |
#page_layout ⇒ Object
Returns the value of attribute page_layout.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def page_layout @page_layout end |
#page_size ⇒ Object
Returns the value of attribute page_size.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def page_size @page_size end |
#rows ⇒ Object
Returns the value of attribute rows.
5 6 7 |
# File 'lib/krupuk/configuration.rb', line 5 def rows @rows end |
Instance Method Details
#cards_per_sheet ⇒ Object
19 20 21 |
# File 'lib/krupuk/configuration.rb', line 19 def cards_per_sheet columns * rows end |