lib/timber/context.rb in timber-2.6.2 vs lib/timber/context.rb in timber-3.0.0
- old
+ new
@@ -1,30 +1,9 @@
module Timber
# Base class for all `Timber::Contexts::*` classes.
# @private
class Context
- class << self
- # The keyspace is the key used when storing the context.
- # For example:
- #
- # {:build => {:version => "1.0.0"}}
- #
- # The keyspace in the above context is `:build`. This is required
- # because it prevents key name conflicts. Without the keyspace
- # it very possible another context type might also have a `:version`
- # attribute.
- def keyspace
- @keyspace || raise(NotImplementedError.new)
- end
+ def to_hash
+ raise(NotImplementedError.new)
end
-
- # Returns a simple structure sufficient for encoding. We use
- # `as_json` as the name since this is a ruby pattern.
- def as_json(options = {})
- raise NotImplementedError.new
- end
-
- def keyspace
- self.class.keyspace
- end
end
-end
\ No newline at end of file
+end