Class: MdRecord::Category
- Inherits:
-
Object
- Object
- MdRecord::Category
- Defined in:
- lib/md_record/category.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
readonly
Returns the value of attribute key.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#position ⇒ Object
readonly
Returns the value of attribute position.
Instance Method Summary collapse
-
#initialize(key:, name:, position:) ⇒ Category
constructor
A new instance of Category.
- #to_param ⇒ Object
Constructor Details
#initialize(key:, name:, position:) ⇒ Category
Returns a new instance of Category.
7 8 9 10 11 |
# File 'lib/md_record/category.rb', line 7 def initialize(key:, name:, position:) @key = key @name = name @position = position end |
Instance Attribute Details
#key ⇒ Object (readonly)
Returns the value of attribute key.
5 6 7 |
# File 'lib/md_record/category.rb', line 5 def key @key end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/md_record/category.rb', line 5 def name @name end |
#position ⇒ Object (readonly)
Returns the value of attribute position.
5 6 7 |
# File 'lib/md_record/category.rb', line 5 def position @position end |
Instance Method Details
#to_param ⇒ Object
13 14 15 |
# File 'lib/md_record/category.rb', line 13 def to_param key end |