Module: MastodonCthulhu
- Defined in:
- lib/mastodon_cthulhu.rb,
lib/mastodon_cthulhu/convert.rb,
lib/mastodon_cthulhu/version.rb,
lib/mastodon_cthulhu/convert_random.rb
Defined Under Namespace
Constant Summary collapse
- VERSION =
"0.1.2"
Class Method Summary collapse
Class Method Details
.setup(&proc) ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
# File 'lib/mastodon_cthulhu.rb', line 7 def self.setup(&proc) # create function for Monkey patch extend self ( class << self; self end).module_eval do define_method 'convert_toot', &proc # define_method 'b' do # p 'b' # end end # Monkey patch Api::V1::StatusesController.prepend(ApiV1StatusesControllerPatch) end |