Class: TypedEnums::Registry
- Inherits:
-
Object
- Object
- TypedEnums::Registry
- Defined in:
- lib/typed_enums/registry.rb
Instance Method Summary collapse
- #expected_files ⇒ Object
-
#initialize(scanner: ModelScanner.new) ⇒ Registry
constructor
A new instance of Registry.
Constructor Details
#initialize(scanner: ModelScanner.new) ⇒ Registry
Returns a new instance of Registry.
5 6 7 |
# File 'lib/typed_enums/registry.rb', line 5 def initialize(scanner: ModelScanner.new) @scanner = scanner end |
Instance Method Details
#expected_files ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/typed_enums/registry.rb', line 9 def expected_files javascript_file = Output::JavaScriptFile.new(model_groups:) { "enums.js" => javascript_file.render, "enums.d.ts" => Output::TypeDeclarationFile.new( model_groups:, schema_hash: javascript_file.schema_hash ).render } end |