Class: Skr::Print::Template
- Inherits:
-
Object
- Object
- Skr::Print::Template
- Defined in:
- lib/skr/print/template.rb
Defined Under Namespace
Classes: Definition
Class Method Summary collapse
Class Method Details
.as_json ⇒ Object
39 40 41 42 43 44 45 |
# File 'lib/skr/print/template.rb', line 39 def self.as_json json={} definitions.each do | definition | json[definition.name] = definition.choices end json end |
.definitions ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/skr/print/template.rb', line 31 def self.definitions Pathname.glob(Skr::Print::ROOT.join('types','*')).select { | type | type.directory? }.map { | type | Definition.new( type ) } end |
.get(type) ⇒ Object
27 28 29 |
# File 'lib/skr/print/template.rb', line 27 def self.get(type) Definition.new( Skr::Print::ROOT.join('types', type ) ) end |