Class: Redis::Lua::Script
- Inherits:
-
Object
- Object
- Redis::Lua::Script
- Defined in:
- lib/redis/lua.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#sha ⇒ Object
readonly
Returns the value of attribute sha.
-
#text ⇒ Object
readonly
Returns the value of attribute text.
Instance Method Summary collapse
-
#initialize(name, text) ⇒ Script
constructor
A new instance of Script.
Constructor Details
#initialize(name, text) ⇒ Script
Returns a new instance of Script.
48 49 50 51 52 |
# File 'lib/redis/lua.rb', line 48 def initialize(name, text) @name = name.to_sym @text = text.dup.freeze @sha = Digest::SHA1.hexdigest(text).freeze end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
46 47 48 |
# File 'lib/redis/lua.rb', line 46 def name @name end |
#sha ⇒ Object (readonly)
Returns the value of attribute sha.
46 47 48 |
# File 'lib/redis/lua.rb', line 46 def sha @sha end |
#text ⇒ Object (readonly)
Returns the value of attribute text.
46 47 48 |
# File 'lib/redis/lua.rb', line 46 def text @text end |