Class: PersonalWordlistCLI::DataFile
- Inherits:
-
Object
- Object
- PersonalWordlistCLI::DataFile
- Defined in:
- lib/personal_wordlist_cli/data_file.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ DataFile
constructor
A new instance of DataFile.
- #parse_json ⇒ Object
Constructor Details
#initialize(path) ⇒ DataFile
Returns a new instance of DataFile.
3 4 5 |
# File 'lib/personal_wordlist_cli/data_file.rb', line 3 def initialize(path) @file_content = File.read(path) end |
Instance Method Details
#parse_json ⇒ Object
7 8 9 |
# File 'lib/personal_wordlist_cli/data_file.rb', line 7 def parse_json JSON.parse @file_content, symbolize_names: true end |