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   load   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 DSL files and returns a new reader

Public Instance methods

Load and parse a DSL from the given file name.

Load and parse a DSL from the given file name. Raises Authorization::Reader::DSLFileNotFoundError if the file cannot be found.

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

[Validate]