Module: Redis::DataTypes
- Defined in:
- lib/redis/data_types.rb
Defined Under Namespace
Modules: DateTime, EpochTime, FilePath, Float, IPAddress, Integer, Json, Slug, String, Uri, Yaml
Constant Summary collapse
- TYPES =
%w(String Integer Float EpochTime DateTime Json Yaml IPAddress FilePath Uri Slug)
Class Method Summary collapse
Class Method Details
.included(klass) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/redis/data_types.rb', line 4 def self.included(klass) TYPES.each do |data_type| if Object.const_defined?(data_type) klass = Object.const_get(data_type) else klass = Object.const_set(data_type, Class.new) end if const_defined?(data_type) klass.extend const_get(data_type) end end end |