Class: AcosOpenApiHelper::JsonFileHelper
- Inherits:
-
Object
- Object
- AcosOpenApiHelper::JsonFileHelper
- Includes:
- JSON
- Defined in:
- lib/acos_jekyll_openapi.rb
Instance Method Summary collapse
-
#initialize(path) ⇒ JsonFileHelper
constructor
A new instance of JsonFileHelper.
- #json_data ⇒ Object
- #load ⇒ Object
- #path ⇒ Object
Constructor Details
#initialize(path) ⇒ JsonFileHelper
Returns a new instance of JsonFileHelper.
26 27 28 |
# File 'lib/acos_jekyll_openapi.rb', line 26 def initialize(path) @path = path end |
Instance Method Details
#json_data ⇒ Object
34 35 36 |
# File 'lib/acos_jekyll_openapi.rb', line 34 def json_data @json_data end |
#load ⇒ Object
39 40 41 42 |
# File 'lib/acos_jekyll_openapi.rb', line 39 def load file = File.read(@path) @json_data = JSON.parse(file) end |
#path ⇒ Object
30 31 32 |
# File 'lib/acos_jekyll_openapi.rb', line 30 def path @path end |