Class: Views::Html

Inherits:
Object
  • Object
show all
Includes:
HtmlSlice
Defined in:
lib/roda/templates/front-end/app/views/html.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(t) ⇒ Html

Returns a new instance of Html.



8
9
10
11
# File 'lib/roda/templates/front-end/app/views/html.rb', line 8

def initialize(t)
  @t = t
  @foo = Views::Foo::Html.new
end

Instance Attribute Details

#fooObject (readonly)

for more component classes



6
7
8
# File 'lib/roda/templates/front-end/app/views/html.rb', line 6

def foo
  @foo
end

Instance Method Details



13
14
15
16
17
18
19
20
# File 'lib/roda/templates/front-end/app/views/html.rb', line 13

def navbar
  html_slice do
    div class: "navbar" do
      a "home", href: "/"
      a "foo/bar", href: "/foo/bar"
    end
  end
end