class HS::Module
Attributes
chapter[R]
content[R]
intro[RW]
slug[RW]
title[RW]
Public Class Methods
load(chapter, file)
click to toggle source
# File lib/hs/models/module.rb, line 16 def self.load(chapter, file) load_module(chapter, File.read(file)) end
new(chapter, args)
click to toggle source
# File lib/hs/models/module.rb, line 20 def initialize(chapter, args) @chapter = chapter @content = [] args.each do |key, val| instance_variable_set("@#{key}", val) end end
Public Instance Methods
hs_url()
click to toggle source
URL of this module when published.
# File lib/hs/models/module.rb, line 30 def hs_url "#{chapter.hs_url}/#{slug}" end