class PigeonHole::TypedJSON::UnsupportedType
Attributes
key[R]
klass[R]
Public Class Methods
new(key, klass)
click to toggle source
Calls superclass method
# File lib/pigeon_hole/typed_json.rb, line 7 def initialize(key, klass) @key = key @klass = klass super("Serialization of #{klass} is not supported - key=#{key}") end
Public Instance Methods
add_index_context(index)
click to toggle source
# File lib/pigeon_hole/typed_json.rb, line 18 def add_index_context(index) add_context("[#{index}]") end
add_key_context(parent_key)
click to toggle source
# File lib/pigeon_hole/typed_json.rb, line 14 def add_key_context(parent_key) add_context(parent_key) end
Private Instance Methods
add_context(context)
click to toggle source
# File lib/pigeon_hole/typed_json.rb, line 24 def add_context(context) combined_key = [context, key].compact.join(".").sub(".[", "[") self.class.new(combined_key, klass) end