Sha256: 5ef4f2746fb6a12d4a0c378d1a80852d59f1d57f9b2f2c4b04bf85380f6c52ef
Contents?: true
Size: 724 Bytes
Versions: 1
Compression:
Stored size: 724 Bytes
Contents
module DotGrid module Page class Factory class UnknownPageExeception < Exception; end PAGES = { 'dot_grid' => ::DotGrid::Page::DotGrid, 'planner' => ::DotGrid::Page::Planner, 'grid' => ::DotGrid::Page::Grid, 'grid_plus_lines' => ::DotGrid::Page::GridPlusLines, 'horizontal_rule' => ::DotGrid::Page::HorizontalRule, 'checkerboard' => ::DotGrid::Page::Checkerboard, 'dot_dash' => ::DotGrid::Page::DotDash, } def self.build(page_type, params) raise UnknownPageExeception, "Unknown page type: #{page_type}" unless PAGES[page_type] PAGES[page_type].new(params) end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
dot_grid-0.0.12 | lib/dot_grid/page/factory.rb |