Class: CantangoEditor::Category
- Inherits:
-
Object
- Object
- CantangoEditor::Category
- Defined in:
- app/models/cantango_editor/category.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
- #human_name ⇒ Object
-
#initialize(category_name, targets_string) ⇒ Category
constructor
TODO: Should we opt aliases in the categories.yml?.
Constructor Details
#initialize(category_name, targets_string) ⇒ Category
TODO: Should we opt aliases in the categories.yml?
8 9 10 11 |
# File 'app/models/cantango_editor/category.rb', line 8 def initialize category_name, targets_string @category_name = category_name #@targets = targets_string end |
Instance Attribute Details
#name ⇒ Object (readonly)
Returns the value of attribute name.
4 5 6 |
# File 'app/models/cantango_editor/category.rb', line 4 def name @name end |
Instance Method Details
#human_name ⇒ Object
17 18 19 |
# File 'app/models/cantango_editor/category.rb', line 17 def human_name name.gsub(/\^/,'').humanize end |