Class: Seek::SampleTemplates::Generator
- Inherits:
-
Object
- Object
- Seek::SampleTemplates::Generator
- Defined in:
- lib/seek/sample_templates/generator.rb
Overview
Generator class for creating templates. Generally this shouldn’t be used directly, but instead should be used through Seek::SampleTemplates.generate(..)
Constant Summary collapse
- JAR_VERSION =
'0.3'.freeze
- JAR_PATH =
File.dirname(__FILE__) + "/../../../jars/sample-template-generator-#{JAR_VERSION}.jar"
- DEFAULT_MEMORY_ALLOCATION =
'512M'.freeze
- BUFFER_SIZE =
1/4 a megabyte
250_000
Instance Attribute Summary collapse
-
#json ⇒ Object
readonly
Returns the value of attribute json.
-
#memory_allocation ⇒ Object
readonly
Returns the value of attribute memory_allocation.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
Instance Method Summary collapse
- #generate ⇒ Object
-
#initialize(path, json, memory_allocation = DEFAULT_MEMORY_ALLOCATION) ⇒ Generator
constructor
A new instance of Generator.
Constructor Details
#initialize(path, json, memory_allocation = DEFAULT_MEMORY_ALLOCATION) ⇒ Generator
Returns a new instance of Generator.
18 19 20 21 22 |
# File 'lib/seek/sample_templates/generator.rb', line 18 def initialize(path, json, memory_allocation = DEFAULT_MEMORY_ALLOCATION) @path = path @json = json @memory_allocation = memory_allocation end |
Instance Attribute Details
#json ⇒ Object (readonly)
Returns the value of attribute json.
16 17 18 |
# File 'lib/seek/sample_templates/generator.rb', line 16 def json @json end |
#memory_allocation ⇒ Object (readonly)
Returns the value of attribute memory_allocation.
16 17 18 |
# File 'lib/seek/sample_templates/generator.rb', line 16 def memory_allocation @memory_allocation end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
16 17 18 |
# File 'lib/seek/sample_templates/generator.rb', line 16 def path @path end |
Instance Method Details
#generate ⇒ Object
24 25 26 |
# File 'lib/seek/sample_templates/generator.rb', line 24 def generate run_with_cocaine end |