Class: TinyAdmin::Section
- Inherits:
-
Object
- Object
- TinyAdmin::Section
- Defined in:
- lib/tiny_admin/section.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
-
#path ⇒ Object
readonly
Returns the value of attribute path.
-
#slug ⇒ Object
readonly
Returns the value of attribute slug.
Instance Method Summary collapse
-
#initialize(name:, slug: nil, path: nil, options: {}) ⇒ Section
constructor
A new instance of Section.
Constructor Details
#initialize(name:, slug: nil, path: nil, options: {}) ⇒ Section
Returns a new instance of Section.
7 8 9 10 11 12 |
# File 'lib/tiny_admin/section.rb', line 7 def initialize(name:, slug: nil, path: nil, options: {}) @name = name = @path = path || TinyAdmin.route_for(slug) @slug = slug end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/tiny_admin/section.rb', line 5 def name @name end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
5 6 7 |
# File 'lib/tiny_admin/section.rb', line 5 def end |
#path ⇒ Object (readonly)
Returns the value of attribute path.
5 6 7 |
# File 'lib/tiny_admin/section.rb', line 5 def path @path end |
#slug ⇒ Object (readonly)
Returns the value of attribute slug.
5 6 7 |
# File 'lib/tiny_admin/section.rb', line 5 def slug @slug end |