Class: Prawn::LabelSheet::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/prawn/label_sheet/configuration.rb

Overview

config options

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



14
15
16
# File 'lib/prawn/label_sheet/configuration.rb', line 14

def initialize
  @default_layout = 'Avery7160'
end

Instance Attribute Details

#default_layoutString

Default layout key

Returns:

  • (String)

    the default key



11
12
13
# File 'lib/prawn/label_sheet/configuration.rb', line 11

def default_layout
  @default_layout
end

#layouts{String => Hash}

Layout definitions

Returns:

  • ({String => Hash})


21
22
23
# File 'lib/prawn/label_sheet/configuration.rb', line 21

def layouts
  @layouts ||= YAML.load_file(File.expand_path('layouts.yml', __dir__))
end