Module: EffectiveStyleGuide
- Defined in:
- lib/effective_style_guide.rb,
lib/effective_style_guide/engine.rb,
lib/effective_style_guide/version.rb,
lib/generators/effective_style_guide/install_generator.rb
Defined Under Namespace
Modules: Generators
Classes: Engine
Constant Summary
collapse
- VERSION =
'1.3.6'.freeze
Class Method Summary
collapse
Class Method Details
.authorized?(controller, action, resource) ⇒ Boolean
14
15
16
17
18
19
|
# File 'lib/effective_style_guide.rb', line 14
def self.authorized?(controller, action, resource)
if authorization_method.respond_to?(:call) || authorization_method.kind_of?(Symbol)
raise Effective::AccessDenied.new() unless (controller || self).instance_exec(controller, action, resource, &authorization_method)
end
true
end
|
.colors ⇒ Object
21
22
23
|
# File 'lib/effective_style_guide.rb', line 21
def self.colors
['red', 'orange', 'yellow', 'green', 'blue', 'indigo', 'violet', 'black', 'white', 'gray']
end
|
.foods ⇒ Object
25
26
27
|
# File 'lib/effective_style_guide.rb', line 25
def self.foods
['Coffee', 'Tea', 'Soda']
end
|
.setup {|_self| ... } ⇒ Object
10
11
12
|
# File 'lib/effective_style_guide.rb', line 10
def self.setup
yield self
end
|