Module: ActionWidget
- Defined in:
- lib/action_widget.rb,
lib/action_widget/base.rb,
lib/action_widget/version.rb,
lib/action_widget/view_helper.rb,
lib/action_widget/configuration.rb,
lib/action_widget/extensions/middleman.rb,
lib/action_widget/extensions/rails/railtie.rb,
lib/action_widget/extensions/rails/generators.rb
Defined Under Namespace
Modules: Extensions, ViewHelper
Classes: Base, Configuration
Constant Summary
collapse
- VERSION =
'0.6.1'
Class Method Summary
collapse
Class Method Details
.[](helper_name) ⇒ Object
5
6
7
|
# File 'lib/action_widget.rb', line 5
def [](helper_name)
registry[helper_name]
end
|
.[]=(helper_name, klass) ⇒ Object
9
10
11
|
# File 'lib/action_widget.rb', line 9
def []=(helper_name, klass)
registry[helper_name] = klass
end
|
.configuration ⇒ Object
13
14
15
|
# File 'lib/action_widget.rb', line 13
def configuration
@configuration ||= Configuration.new(suffix: "Widget")
end
|
17
18
19
|
# File 'lib/action_widget.rb', line 17
def configure(&block)
@configuration = Configuration.new(&block)
end
|
.helper?(name) ⇒ Boolean
21
22
23
|
# File 'lib/action_widget.rb', line 21
def helper?(name)
!!configuration.pattern.match(name)
end
|