Module: Saint

Extended by:
Presto::Utils, Presto::View::Utils
Defined in:
lib/saint/inflector/inflections.rb,
lib/saint.rb,
lib/saint/orm.rb,
lib/saint/menu.rb,
lib/saint/mixin.rb,
lib/saint/pager.rb,
lib/saint/utils.rb,
lib/saint/version.rb,
lib/saint/api/opts.rb,
lib/saint/file_server.rb,
lib/saint/extender/fm.rb,
lib/saint/file_manager.rb,
lib/saint/api/class/fm.rb,
lib/saint/api/class/api.rb,
lib/saint/api/class/tab.rb,
lib/saint/api/class/menu.rb,
lib/saint/api/class/opts.rb,
lib/saint/api/class/order.rb,
lib/saint/api/class/assoc.rb,
lib/saint/api/class/filter.rb,
lib/saint/api/class/subset.rb,
lib/saint/api/instance/api.rb,
lib/saint/api/class/column.rb,
lib/saint/extender/crud/crud.rb,
lib/saint/api/instance/filter.rb,
lib/saint/extender/crud/assoc.rb,
lib/saint/api/instance/column.rb,
lib/saint/api/class/rb_wrapper.rb,
lib/saint/extender/crud/filter.rb,
lib/saint/extender/crud/helpers.rb

Overview

kindly borrowed from ActiveSupport

Defined Under Namespace

Modules: Api, FileManager, Inflector, ORMMixin, ORMQuery, ORMUtils, OptsApi, Utils Classes: Assoc, ClassApi, Column, CrudExtender, FileServer, Filter, FilterInstance, FmExtender, InstanceApi, Menu, MenuApi, ORM, Pager, RbWrapper, SaintTab

Constant Summary

VERSION =
'0.2.6'

Class Attribute Summary (collapse)

Class Method Summary (collapse)

Class Attribute Details

+ (Object) controllers

Returns the value of attribute controllers



20
21
22
# File 'lib/saint.rb', line 20

def controllers
  @controllers
end

Returns the value of attribute menu



20
21
22
# File 'lib/saint.rb', line 20

def menu
  @menu
end

+ (Object) relations

Returns the value of attribute relations



20
21
22
# File 'lib/saint.rb', line 20

def relations
  @relations
end

Class Method Details

+ (Object) items_per_page(n = nil) Also known as: ipp



36
37
38
39
# File 'lib/saint.rb', line 36

def items_per_page n = nil
  @ipp = n if n
  @ipp
end

+ (Object) ordered_controllers



26
27
28
29
# File 'lib/saint.rb', line 26

def ordered_controllers
  controllers.select { |n| n.saint.menu.label unless n.saint.menu.disabled? }.
      sort { |a, b| [b.saint.menu.position, a.saint.label] <=> [a.saint.menu.position, b.saint.label] }
end

+ (Object) orm(orm = nil)



31
32
33
34
# File 'lib/saint.rb', line 31

def orm orm = nil
  @orm = orm if orm
  @orm
end

+ (Object) root



22
23
24
# File 'lib/saint.rb', line 22

def root
  @root ||= ::File.join(::File.expand_path('../saint', __FILE__), '')
end

+ (Object) tree_colors(*colors)



43
44
45
46
# File 'lib/saint.rb', line 43

def tree_colors *colors
  @tree_colors = colors if colors.size > 0
  @tree_colors
end

+ (Object) view



48
49
50
# File 'lib/saint.rb', line 48

def view
  @view ||= Struct.new(:root, :engine, :ext).new(::File.join(root, 'view/'), :Erubis, 'erb')
end