Class Authorization::Reader::DSLReader
In: lib/declarative_authorization/reader.rb
Parent: Object

Top-level reader, parses the methods privileges and authorization. authorization takes a block with authorization rules as described in AuthorizationRulesReader. The block to privileges defines privilege hierarchies, as described in PrivilegesReader.

Methods

factory   load   new   parse  

Public Class methods

ensures you get back a DSLReader if you provide a:

  DSLReader - you will get it back.
  String or Array - it will treat it as if you have passed a path or an array of paths and attempt to load those.

Loads and parses a DSL from the given file name.

Public Instance methods

Parses a authorization DSL specification from the string given in dsl_data. Raises DSLSyntaxError if errors occur on parsing.

[Validate]