Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Anatomy of constant lookup and autoloading in R...

Prathamesh Sonpatki
March 19, 2016
190

Anatomy of constant lookup and autoloading in Rails

Prathamesh Sonpatki

March 19, 2016
Tweet

Transcript

  1. module SuperAdmin BASE_URL = “https://github.com/api/v1” module Admin class ApiController <

    BaseController def print_location puts BASE_URL #=> ? end end end end
  2. module SuperAdmin BASE_URL = “https://github.com/api/v1” module Admin class ApiController <

    BaseController def print_location puts BASE_URL end end end end #=> “https://github.com/api/v1”
  3. class BaseController BASE_URL = “https://github.com/api/v1” end class ApiController < BaseController

    def print_location puts BASE_URL end end #=> “https://github.com/api/v1”
  4. class BaseController BASE_URL = “https://github.com/api/v2” end module Admin BASE_URL =

    “https://github.com/api/v1” class ApiController < BaseController def print_location puts BASE_URL #=> ? end end end
  5. module Admin BASE_URL = “https://github.com/api/v1” class ApiController < BaseController def

    print_location puts BASE_URL end end end #=> “https://github.com/api/v1”
  6. class BaseController BASE_URL = “https://github.com/api/v2” end module Admin class ApiController

    < BaseController def print_location puts BASE_URL end end end #=> “https://github.com/api/v2”