Class: SimpleRedisOrm::ApplicationEntry
- Defined in:
- lib/simple-redis-orm/application_entry.rb
Class Attribute Summary collapse
-
.model_name ⇒ Object
writeonly
Sets the attribute model_name.
Class Method Summary collapse
Methods inherited from Entry
#attributes, #id, redis, #redis, redis=, #save, without_redis_key_prefix
Methods included from Helpers::CoreCommands::ClassMethods
#read_by, #read_hash, #read_value
Methods included from Helpers::Serializer
#deserialize_hash_value, #deserialize_value, #serialize_value
Methods included from Helpers::CoreCommands
#exists, #exists?, #expire, #read, #read_hash, #read_subhash, #read_value, #set, #set_hash, #set_subhash, #ttl
Class Attribute Details
.model_name=(value) ⇒ Object
Sets the attribute model_name
4 5 6 |
# File 'lib/simple-redis-orm/application_entry.rb', line 4 def model_name=(value) @model_name = value end |
Class Method Details
.create(id:, **attributes) ⇒ Object
10 11 12 |
# File 'lib/simple-redis-orm/application_entry.rb', line 10 def create(id:, **attributes) super(id: redis_key(id), **attributes) end |
.find(id) ⇒ Object
14 15 16 |
# File 'lib/simple-redis-orm/application_entry.rb', line 14 def find(id) super(redis_key(id)) end |
.new(id:, **attributes) ⇒ Object
6 7 8 |
# File 'lib/simple-redis-orm/application_entry.rb', line 6 def new(id:, **attributes) super(id: redis_key(id), **attributes) end |