Class: ActiveSnapshot::Config
- Inherits:
-
Object
- Object
- ActiveSnapshot::Config
- Defined in:
- lib/active_snapshot/config.rb
Instance Attribute Summary collapse
-
#storage_method ⇒ Object
Returns the value of attribute storage_method.
Instance Method Summary collapse
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #storage_method_json? ⇒ Boolean
- #storage_method_native_json? ⇒ Boolean
- #storage_method_yaml? ⇒ Boolean
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
5 6 7 |
# File 'lib/active_snapshot/config.rb', line 5 def initialize @storage_method = 'serialized_json' end |
Instance Attribute Details
#storage_method ⇒ Object
Returns the value of attribute storage_method.
3 4 5 |
# File 'lib/active_snapshot/config.rb', line 3 def storage_method @storage_method end |
Instance Method Details
#storage_method_json? ⇒ Boolean
23 24 25 |
# File 'lib/active_snapshot/config.rb', line 23 def storage_method_json? @storage_method == 'serialized_json' end |
#storage_method_native_json? ⇒ Boolean
27 28 29 |
# File 'lib/active_snapshot/config.rb', line 27 def storage_method_native_json? @storage_method == 'native_json' end |
#storage_method_yaml? ⇒ Boolean
19 20 21 |
# File 'lib/active_snapshot/config.rb', line 19 def storage_method_yaml? @storage_method == 'serialized_yaml' end |