-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Description
Hi @pete
I have an outside class that has a to_hoshi method. How can I have that method interpolated into the Hoshi output of my view class in Watts. Here is an example:
require "hoshi"
class Foo < Hoshi::View :html5
def show
h1 "inside Foo#show"
Bar.new.inclusion
inclusion
end
def inclusion
h2 "inside Foo#inclusion"
end
end
class Bar
def inclusion
h2 "inside Bar#inclusion"
end
end
puts Foo.new.showDesired output:
<h1>inside Foo#show</h1>
<h2>inside Bar#inclusion</h2>
<h2>inside Foo#inclusion</h2>Current output:
inclusion': undefined method 'h2' for #<Bar:0x0055dafd73e988> (NoMethodError)
Thanks!
Metadata
Metadata
Assignees
Labels
No labels