Class: Schemas::Loader
- Inherits:
-
Object
- Object
- Schemas::Loader
- Defined in:
- lib/schema_loader.rb
Instance Method Summary collapse
-
#initialize(filename) ⇒ Loader
constructor
A new instance of Loader.
- #load ⇒ Object
Constructor Details
#initialize(filename) ⇒ Loader
Returns a new instance of Loader.
5 6 7 |
# File 'lib/schema_loader.rb', line 5 def initialize(filename) @filename = filename end |
Instance Method Details
#load ⇒ Object
9 10 11 |
# File 'lib/schema_loader.rb', line 9 def load JSON.parse(File.read(@filename)) end |