Unable to override method in 1.2
tycooon opened this issue · 3 comments
tycooon commented
gem "surrealist", "1.2.0"
require "surrealist"
class KekSerializer < Surrealist::Serializer
json_schema do
{
kek: String,
cheburek: String,
}
end
def kek
"kek"
end
def cheburek
"cheburek"
end
end
class A
def kek
"smth"
end
end
kek = A.new
p KekSerializer.new(kek).build_schema # => {:kek=>"smth", :cheburek=>"cheburek"}
The output was {:kek=>"kek", :cheburek=>"cheburek"}
in version 1.1.2.
gjhenrique commented
nesaulov commented
@gjhenrique sure, I wanted to fix that but I can't really find the time still. Thank you!