class Raddocs::IndexExample

Example model for the index page

Has an extra link attribute that is required only on this page.

Attributes

description[R]

Public Class Methods

new(attributes) click to toggle source
# File lib/raddocs/models.rb, line 36
def initialize(attributes)
  @description = attributes.fetch("description")
  @link = attributes.fetch("link")
end

Public Instance Methods

href() click to toggle source

Link to example page is the same name as the file minus “.json”

# File lib/raddocs/models.rb, line 42
def href
  link.gsub(".json", "")
end