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.
50 51 52 53 |
# File 'lib/emb/batch.rb', line 50 def initialize(client, name) @client = client @name = name end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
48 49 50 |
# File 'lib/emb/batch.rb', line 48 def name @name end |
Instance Method Details
#[](text, *texts) ⇒ Object
55 56 57 |
# File 'lib/emb/batch.rb', line 55 def [](text, *texts) Emb.build_batch_loader(@client, @name, texts.empty? ? text : [text, *texts]) end |
#inspect ⇒ Object
59 60 61 |
# File 'lib/emb/batch.rb', line 59 def inspect "#<Emb::BatchModelProxy #{@name}>" end |