Class: Authorization::DevelopmentSupport::Analyzer::GeneralAuthorizationProcessor
- Inherits:
-
SexpProcessor
- Object
- SexpProcessor
- Authorization::DevelopmentSupport::Analyzer::GeneralAuthorizationProcessor
- Defined in:
- lib/declarative_authorization/development_support/analyzer.rb
Direct Known Subclasses
Instance Method Summary collapse
- #analyze(sexp_array) ⇒ Object
- #analyze_rules ⇒ Object
-
#initialize(analyzer) ⇒ GeneralAuthorizationProcessor
constructor
A new instance of GeneralAuthorizationProcessor.
- #process_arglist(exp) ⇒ Object
- #process_hash(exp) ⇒ Object
- #process_iter(exp) ⇒ Object
- #process_lit(exp) ⇒ Object
Constructor Details
#initialize(analyzer) ⇒ GeneralAuthorizationProcessor
Returns a new instance of GeneralAuthorizationProcessor.
143 144 145 146 147 148 149 |
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 143 def initialize(analyzer) super() self.auto_shift_type = true self.require_empty = false self.strict = false @analyzer = analyzer end |
Instance Method Details
#analyze(sexp_array) ⇒ Object
151 152 153 154 |
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 151 def analyze (sexp_array) process(sexp_array) analyze_rules end |
#analyze_rules ⇒ Object
156 157 158 |
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 156 def analyze_rules # to be implemented by specific processor end |
#process_arglist(exp) ⇒ Object
164 165 166 |
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 164 def process_arglist (exp) s(exp.collect {|inner_exp| process(inner_exp).shift}) end |
#process_hash(exp) ⇒ Object
168 169 170 |
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 168 def process_hash (exp) s(Hash[*exp.collect {|inner_exp| process(inner_exp).shift}]) end |
#process_iter(exp) ⇒ Object
160 161 162 |
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 160 def process_iter (exp) s(:iter, process(exp.shift), process(exp.shift), process(exp.shift)) end |
#process_lit(exp) ⇒ Object
172 173 174 |
# File 'lib/declarative_authorization/development_support/analyzer.rb', line 172 def process_lit (exp) s(exp.shift) end |