Class: DTK::Client::ViewPrettyPrintHash

Inherits:
Common::PrettyPrintHash
  • Object
show all
Defined in:
lib/view_processor/hash_pretty_print.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(object_type = nil) ⇒ ViewPrettyPrintHash

Returns a new instance of ViewPrettyPrintHash.



111
112
113
114
# File 'lib/view_processor/hash_pretty_print.rb', line 111

def initialize(object_type=nil)
  super()
  @object_type = object_type
end

Instance Attribute Details

#object_typeObject

Returns the value of attribute object_type.



115
116
117
# File 'lib/view_processor/hash_pretty_print.rb', line 115

def object_type
  @object_type
end

Instance Method Details

#slice(*keys) ⇒ Object



116
117
118
119
120
# File 'lib/view_processor/hash_pretty_print.rb', line 116

def slice(*keys)
  ret = super
  ret.object_type = object_type
  ret
end