Module: RailsAccordion
- Defined in:
- lib/rails_accordion.rb,
lib/rails_accordion/version.rb,
lib/rails_accordion/configuration.rb,
lib/generators/rails_accordion/install_generator.rb
Defined Under Namespace
Modules: Generators
Classes: Configuration, Engine, Railtie
Constant Summary
collapse
- VERSION =
"1.0.4"
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.configuration ⇒ Object
12
13
14
|
# File 'lib/rails_accordion/configuration.rb', line 12
def self.configuration
@configuration ||= Configuration.new
end
|
.configuration=(config) ⇒ Object
16
17
18
|
# File 'lib/rails_accordion/configuration.rb', line 16
def self.configuration=(config)
@configuration = config
end
|
20
21
22
|
# File 'lib/rails_accordion/configuration.rb', line 20
def self.configure
yield configuration
end
|
Instance Method Details
#accordion(**args, &block) ⇒ Object
30
31
32
|
# File 'lib/rails_accordion.rb', line 30
def accordion(**args, &block)
render AccordionComponent.new(**args), &block
end
|
#accordion_item(**args, &block) ⇒ Object
34
35
36
|
# File 'lib/rails_accordion.rb', line 34
def accordion_item(**args, &block)
render ItemComponent.new(**args), &block
end
|
#rails_accordion_assets ⇒ Object
38
39
40
|
# File 'lib/rails_accordion.rb', line 38
def rails_accordion_assets
render "rails_accordion/assets"
end
|