[Haml] Convert Haml::Helpers::ActionViewExtensions docs to YARD.
This commit is contained in:
parent
83b0fc8209
commit
f60d0f691e
|
@ -1,5 +1,7 @@
|
|||
if defined?(ActionView)
|
||||
require 'haml/helpers/action_view_mods'
|
||||
require 'haml/helpers/action_view_extensions'
|
||||
end
|
||||
|
||||
module Haml
|
||||
# This module contains various helpful methods to make it easier to do various tasks.
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
require 'haml/helpers/action_view_mods'
|
||||
|
||||
if defined?(ActionView)
|
||||
module Haml
|
||||
module Helpers
|
||||
# This module contains various useful helper methods
|
||||
|
@ -12,7 +11,7 @@ if defined?(ActionView)
|
|||
# Returns a value for the "class" attribute
|
||||
# unique to this controller/action pair.
|
||||
# This can be used to target styles specifically at this action or controller.
|
||||
# For example, if the current action were EntryController#show,
|
||||
# For example, if the current action were `EntryController#show`,
|
||||
#
|
||||
# %div{:class => page_class} My Div
|
||||
#
|
||||
|
@ -20,8 +19,7 @@ if defined?(ActionView)
|
|||
#
|
||||
# <div class="entry show">My Div</div>
|
||||
#
|
||||
# Then, in a stylesheet
|
||||
# (shown here as Sass),
|
||||
# Then, in a stylesheet (shown here as {Sass}),
|
||||
# you could refer to this specific action:
|
||||
#
|
||||
# .entry.show
|
||||
|
@ -32,14 +30,11 @@ if defined?(ActionView)
|
|||
# .entry
|
||||
# :color #00f
|
||||
#
|
||||
# @return [String] The class name for the current page
|
||||
def page_class
|
||||
controller.controller_name + " " + controller.action_name
|
||||
end
|
||||
|
||||
# :stopdoc:
|
||||
alias_method :generate_content_class_names, :page_class
|
||||
# :startdoc:
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
if defined?(ActionView) and not defined?(Merb::Plugins)
|
||||
module ActionView
|
||||
class Base
|
||||
def render_with_haml(*args, &block)
|
||||
|
@ -173,5 +172,3 @@ if defined?(ActionView) and not defined?(Merb::Plugins)
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue