module Seek::SampleTemplates
Main entry point for generating templates
Constants
- VERSION
Public Class Methods
generate(sheet_name, sheet_index, columns, base_template_path, output_path)
click to toggle source
generates a template at the specific path
# File lib/seek/sample_templates.rb, line 8 def self.generate(sheet_name, sheet_index, columns, base_template_path, output_path) Seek::SampleTemplates::Generator.new( output_path, create_json(sheet_name,sheet_index,columns,base_template_path) ).generate end
Private Class Methods
create_json(sheet_name,sheet_index,columns,base_template_path)
click to toggle source
# File lib/seek/sample_templates.rb, line 14 def self.create_json(sheet_name,sheet_index,columns,base_template_path) definition = { sheet_name: sheet_name, sheet_index: sheet_index, columns: columns.collect(&:as_json) } definition[:base_template_path]=base_template_path if base_template_path definition.to_json end