Class: Emb::BatchModelProxy
- Inherits:
-
Object
- Object
- Emb::BatchModelProxy
- Defined in:
- lib/emb/batch.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #[](text, *texts) ⇒ Object
-
#initialize(client, name) ⇒ BatchModelProxy
constructor
A new instance of BatchModelProxy.
- #inspect ⇒ Object
Constructor Details
#initialize(client, name) ⇒ BatchModelProxy
Returns a new instance of BatchModelProxy.
56 57 58 59 |
# File 'lib/emb/batch.rb', line 56 def initialize(client, name) @client = client @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
54 55 56 |
# File 'lib/emb/batch.rb', line 54 def name @name end |
Instance Method Details
#[](text, *texts) ⇒ Object
61 62 63 |
# File 'lib/emb/batch.rb', line 61 def [](text, *texts) Emb.build_batch_loader(@client, @name, texts.empty? ? text : [text, *texts]) end |
#inspect ⇒ Object
65 66 67 |
# File 'lib/emb/batch.rb', line 65 def inspect "#<Emb::BatchModelProxy #{@name}>" end |