Method: MotionPrime::Section#default_name

Defined in:
motion-prime/sections/base_section.rb

#default_nameObject

Get section default name, based on class name

Examples:

class ProfileSection < Prime::Section
end

section = ProfileSection.new
section.default_name # => 'profile'
section.name         # => 'profile'

another_section = ProfileSection.new(name: 'another')
another_section.default_name # => 'profile'
another_section.name         # => 'another'


106
107
108
# File 'motion-prime/sections/base_section.rb', line 106

def default_name
  underscore_factory(self.class_name_without_kvo.demodulize).gsub(/\_section$/, '')
end