Class: Respect::Rails::Engine

Inherits:
Rails::Engine
  • Object
show all
Defined in:
lib/respect/rails/engine.rb

Class Method Summary (collapse)

Class Method Details

+ (Object) app_documentation(text = nil)

Set the documentation of your application. The title would be the first line if followed by an empty line and the description would be the rest. If text is nil the current documentation is returned.



48
49
50
51
52
53
54
# File 'lib/respect/rails/engine.rb', line 48

def self.app_documentation(text = nil)
  if text
    @@app_documentation = text
  else
    @@app_documentation
  end
end

+ (Object) doc_app_name



36
37
38
# File 'lib/respect/rails/engine.rb', line 36

def self.doc_app_name
  @@doc_app_name ||= ::Rails.application.class.parent_name
end

+ (Object) helpers(*helper_modules)

Include all helper_modules in the DSL definition classes, so that you can use its methods for defining schema.



58
59
60
# File 'lib/respect/rails/engine.rb', line 58

def self.helpers(*helper_modules)
  helper_modules.each{|m| Respect.extend_dsl_with(m) }
end

+ (Object) setup(&block)

Default way to setup Respect for Rails.



41
42
43
# File 'lib/respect/rails/engine.rb', line 41

def self.setup(&block)
  block.call(self)
end