tag: 'Ruby: modules'

Narrow your search:

    Log in Sign up
    2 Matching Annotations
    1. Apr 2021
    2. stackoverflow.com stackoverflow.com
      Inheriting class methods from modules / mixins in Ruby
      2
      1. TylerRick 13 Apr 2021
        in Public
        It seems inelegant to me to split this into two different modules, one to include, the other to extend.

        the key thing (one of them) to understand here is that: class methods are singleton methods

        inelegant inconsistent depends on how you look at it Ruby: modules Ruby: class methods Ruby: singleton methods programming languages: learning/understanding the subtleties
      2. TylerRick 13 Apr 2021
        in Public
        Another possible solution would be to use a class Common instead of a module. But this is just a workaround.
        Ruby: modules workaround
      Visit annotations in context

      Tags

      • inconsistent
      • programming languages: learning/understanding the subtleties
      • depends on how you look at it
      • inelegant
      • workaround
      • Ruby: class methods
      • Ruby: modules
      • Ruby: singleton methods

      Annotators

      • TylerRick

      URL

      stackoverflow.com/questions/10692961/inheriting-class-methods-from-modules-mixins-in-ruby
    Share:
    Group. Only group members will be able to view this annotation.
    Only me. No one else will be able to view this annotation.
    Hypothes.is
    • About
    • Blog
    • Bioscience
    • Education
    • Jobs
    • Help
    • Contact
    • Terms of Service
    • Privacy Policy