이것은 "몽키 패칭(monkey patching)"이라고 알려진 기법입니다. 이를 구현하는 방법은 여러 가지가 있지만, 가장 쉬운 방법은 플러그인에서 교체하려는 메서드를 직접 정의하는 것입니다.
after_initialize do
class ::TopicEmbed
def self.imported_from_html(url)
# your code
end
end
end
이것은 "몽키 패칭(monkey patching)"이라고 알려진 기법입니다. 이를 구현하는 방법은 여러 가지가 있지만, 가장 쉬운 방법은 플러그인에서 교체하려는 메서드를 직접 정의하는 것입니다.
after_initialize do
class ::TopicEmbed
def self.imported_from_html(url)
# your code
end
end
end