module DynamicContent

Constants

VERSION

Attributes

locale[RW]

Locale

structure_path[RW]

Structure file path

Public Class Methods

process() click to toggle source
# File lib/dynamic_content.rb, line 40
def self.process
  Processor.new
end
settings() click to toggle source
# File lib/dynamic_content.rb, line 44
def self.settings
  {
    locale: self.locale,
    structure_path: self.structure_path
  }
end
setup() { |self| ... } click to toggle source
# File lib/dynamic_content.rb, line 36
def self.setup(&block)
  yield self
end
structure_file() click to toggle source
# File lib/dynamic_content.rb, line 28
def self.structure_file
  if File.exists? Rails.root.join(self.structure_path)
    return YAML.load(File.read(Rails.root.join(self.structure_path)))
  else
    raise NoStructureFileError, "File #{self.structure_path} is not found."
  end
end