Module: StructuredData::RailsExtentions::BreadclumbList
- Defined in:
- lib/structured_data/rails_extentions/breadcrumb_list.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(controller) ⇒ Object
4 5 6 7 |
# File 'lib/structured_data/rails_extentions/breadcrumb_list.rb', line 4 def self.included(controller) controller.helper_method :breadcrumb_list controller.helper_method :set_breadcrumb_list_item end |
Instance Method Details
#breadcrumb_list(&block) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/structured_data/rails_extentions/breadcrumb_list.rb', line 9 def (&block) ||= StructuredData::BreadcrumbList.new if block_given? .instance_eval(&block) else end end |
#set_breadcrumb_list_item(url:, name:) ⇒ Object
19 20 21 |
# File 'lib/structured_data/rails_extentions/breadcrumb_list.rb', line 19 def (url:, name:) << { url: url, name: name } end |