Class: Huck::Generators::FileGenerator
- Inherits:
-
Huck::Generator
- Object
- Huck::Generator
- Huck::Generators::FileGenerator
- Defined in:
- lib/huck/generators/file.rb
Overview
File generator reads any file and submits the raw content
Instance Attribute Summary
Attributes inherited from Huck::Generator
Instance Method Summary collapse
-
#generate ⇒ Object
Reads in a configured file and returns the data.
-
#verify_config ⇒ Object
Ensure that all JSON config items are properly set.
Methods inherited from Huck::Generator
Instance Method Details
#generate ⇒ Object
Reads in a configured file and returns the data
Returns:
The text contained within the specified file
20 21 22 23 |
# File 'lib/huck/generators/file.rb', line 20 def generate verify_config IO.read(@config['path']) end |