Class: Padrino::Admin::AccessControl::ProjectModule

### Home Classes Methods

### In Files

- lib/padrino-admin/access_control.rb

### Parent

Object

### Methods

- ::new
- #human_name
- #path

### Files

- README.rdoc

### Class/Module Index

Quicksearch

- Padrino
- Padrino::Admin
- Padrino::Admin::AccessControl
- Padrino::Admin::AccessControl::Authorization
- Padrino::Admin::AccessControl::Base
- Padrino::Admin::AccessControl::ProjectModule
- Padrino::Admin::AccessControlError
- Padrino::Admin::Generators
- Padrino::Admin::Generators::Orm
- Padrino::Admin::Generators::OrmError
- Padrino::Admin::Helpers
- Padrino::Admin::Helpers::AuthenticationHelpers
- Padrino::Admin::Helpers::ViewHelpers
- Padrino::Generators
- Padrino::Generators::Admin
- Padrino::Generators::Admin::Actions
- Padrino::Generators::AdminApp
- Padrino::Generators::AdminPage

No matching classes.

# Padrino::Admin::AccessControl::ProjectModule

Project Module class.

### Attributes

name[R]
options[R]

### Public Class Methods

new(name, path, options={}) click to toggle source

    # File lib/padrino-admin/access_control.rb, line 163
    def initialize(name, path, options={})
      @name, @path, @options = name, path, options
    end

### Public Instance Methods

human_name() click to toggle source

Returns the name of the project module humanize them for you.

    # File lib/padrino-admin/access_control.rb, line 170
    def human_name
       @name.to_s.humanize
    end

path(prefix=nil) click to toggle source

Return the path of the project module. If a prefix given will be pre pended.

@example

    # => /accounts/new
    project_module.path
    # => /admin/accounts
    project_module.path("/admin")

    # File lib/padrino-admin/access_control.rb, line 183
    def path(prefix=nil)
      path = prefix ? File.join(prefix, @path) : @path
      path = File.join(ENV['RACK_BASE_URI'].to_s, path) if ENV['RACK_BASE_URI']
      path
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.