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.8.0'
Class Method Summary
collapse
Class Method Details
.[](helper_name) ⇒ Object
6
7
8
|
# File 'lib/action_widget.rb', line 6
def [](helper_name)
registry[helper_name]
end
|
.[]=(helper_name, klass) ⇒ Object
10
11
12
|
# File 'lib/action_widget.rb', line 10
def []=(helper_name, klass)
registry[helper_name] = klass
end
|
.configuration ⇒ Object
14
15
16
|
# File 'lib/action_widget.rb', line 14
def configuration
@configuration ||= Configuration.new(suffix: "Widget")
end
|
18
19
20
|
# File 'lib/action_widget.rb', line 18
def configure(&block)
@configuration = Configuration.new(&block)
end
|
.helper?(name) ⇒ Boolean
22
23
24
|
# File 'lib/action_widget.rb', line 22
def helper?(name)
!!configuration.pattern.match(name)
end
|