Class: Useless::Doc::UI::Godel::Domain

Inherits:
Mustache
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/useless/doc/ui/godel.rb

Instance Method Summary collapse

Constructor Details

#initialize(domain, router = nil) ⇒ Domain

Returns a new instance of Domain.



60
61
62
63
# File 'lib/useless/doc/ui/godel.rb', line 60

def initialize(domain, router = nil)
  @domain = domain
  @router = router
end

Instance Method Details

#apisObject



70
71
72
# File 'lib/useless/doc/ui/godel.rb', line 70

def apis
  @domain.apis.map{ |api| Godel::API.new(api, @router) }
end

#descriptionObject



65
66
67
68
# File 'lib/useless/doc/ui/godel.rb', line 65

def description
  description = Godel.strip_heredoc(@domain.description)
  Godel.markdown.render(description)
end