-
-
Save duncanbeevers/2337946 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class ApplicationModel | |
| extend Feedable | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require './feedable' | |
| require './application_model' | |
| require './verso' | |
| puts Verso.feed |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module Feedable | |
| def act_as_feedable | |
| extend ClassMethods | |
| end | |
| module ClassMethods | |
| def feed | |
| self | |
| end | |
| end | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Verso < ApplicationModel | |
| act_as_feedable | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment