lib/chic/formatter.rb in chic-0.3.1 vs lib/chic/formatter.rb in chic-0.4.0
- old
+ new
@@ -1,12 +1,20 @@
# frozen_string_literal: true
module Chic
class Formatter < SimpleDelegator
- delegate :to_s,
- to: :object
+ attr_reader :context
+ def initialize(object, context = nil)
+ super(object)
+ @context = context
+ end
+
def object
__getobj__
+ end
+
+ def to_s
+ object.to_s
end
end
end