Module: Ollama::DTO::ClassMethods
- Defined in:
- lib/ollama/dto.rb
Instance Attribute Summary collapse
-
#attributes ⇒ Object
Returns the value of attribute attributes.
Instance Method Summary collapse
Instance Attribute Details
#attributes ⇒ Object
Returns the value of attribute attributes.
9 10 11 |
# File 'lib/ollama/dto.rb', line 9 def attributes @attributes end |
Instance Method Details
#attr_reader(*names) ⇒ Object
15 16 17 18 |
# File 'lib/ollama/dto.rb', line 15 def attr_reader(*names) super attributes.merge(names.map(&:to_sym)) end |
#from_hash(hash) ⇒ Object
11 12 13 |
# File 'lib/ollama/dto.rb', line 11 def from_hash(hash) new(**hash.transform_keys(&:to_sym)) end |