Created
April 17, 2018 04:25
-
-
Save jordanhudgens/9af5089e9f138d256c9035a2ee5f7414 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
module GuidesHelper | |
def breadcrumb(topic:, title:) | |
"#{topic} / #{title}" | |
end | |
end | |
def breadcrumb(topic:, title:) | |
"oops" | |
end | |
class Guide | |
include GuidesHelper | |
def initialize(topic:, title:, content:) | |
@topic = topic | |
@title = title | |
@content = content | |
end | |
def page_render | |
puts breadcrumb(topic: @topic, title: @title) | |
puts @content | |
end | |
end | |
g = Guide.new(topic: 'Rails', title: 'My Cool Title', content: 'Some content') | |
g.page_render |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment