lib/garcon/chef/resource/resource_name.rb
# Return the Snake case name of the current resource class. If not set
# explicitly it will be introspected based on the class name.
#
# @param [Boolean] auto
#   Try to auto-detect based on class name.
#
# @return [Symbol]
#
Return the Snake case name of the current resource class. If not set
explicitly it will be introspected based on the class name.
Return the Snake case name of the current resource class . If not set explicitly it will be introspected based on the class name .
def resource_name(auto = true)
          return @provides_name if @provides_name
          @provides_name || if name && name.start_with?('Chef::Resource')
            Garcon::Inflections.snakeify(name, 'Chef::Resource').to_sym
          elsif name
            Garcon::Inflections.snakeify(name.split('::').last).to_sym
          end
        end
def resource_name ( auto = true ) return @provides_name if @provides_name @provides_name || if name && name . start_with? ( 'Chef::Resource' ) Garcon :: Inflections . snakeify ( name , 'Chef::Resource' ) . to_sym elsif name Garcon :: Inflections . snakeify ( name . split ( '::' ) . last ) . to_sym end end
Return the Snake case name of the current resource class.
Return the Snake case name of the current resource class .
None
Symbol
auto
<not_specific>
<not_specific>
auto Try to auto-detect based on class name.
auto Try to auto - detect based on class name .