LoginSignup
1
1

More than 5 years have passed since last update.

Capistrano による Object.extend

Posted at

これってちょっと行儀悪くない...?

[1] pry(main)> require 'capistrano/all'; require 'capistrano/setup'
=> true
[2] pry(main)> Object.ancestors
=> [Object,
 Capistrano::DSL,
 Capistrano::DSL::Stages,
 Capistrano::DSL::Paths,
 Capistrano::DSL::Env,
 Capistrano::TaskEnhancements,
 PP::ObjectMixin,
 Kernel,
 BasicObject]
[3] pry(main)> class Klass;end
=> nil
[4] pry(main)> Klass.instance_methods.grep(/role/)
=> [:role, :roles, :role_properties, :release_roles]

Object にメソッドを大量に生やしてくる

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1