Class: Roseflow::StabilityAI::ModelRepository
- Inherits:
-
Object
- Object
- Roseflow::StabilityAI::ModelRepository
- Defined in:
- lib/roseflow/stabilityai/model_repository.rb
Instance Attribute Summary collapse
-
#models ⇒ Object
readonly
Returns the value of attribute models.
Instance Method Summary collapse
- #find(name) ⇒ Object
-
#initialize(provider) ⇒ ModelRepository
constructor
A new instance of ModelRepository.
Constructor Details
#initialize(provider) ⇒ ModelRepository
Returns a new instance of ModelRepository.
12 13 14 15 |
# File 'lib/roseflow/stabilityai/model_repository.rb', line 12 def initialize(provider) @provider = provider @models = load_models end |
Instance Attribute Details
#models ⇒ Object (readonly)
Returns the value of attribute models.
8 9 10 |
# File 'lib/roseflow/stabilityai/model_repository.rb', line 8 def models @models end |
Instance Method Details
#find(name) ⇒ Object
17 18 19 |
# File 'lib/roseflow/stabilityai/model_repository.rb', line 17 def find(name) @models.select { |model| model.name == name }.first end |