Class: CantangoEditor::Category

Inherits:
Object
  • Object
show all
Defined in:
app/models/cantango_editor/category.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#nameObject (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_nameObject



17
18
19
# File 'app/models/cantango_editor/category.rb', line 17

def human_name
  name.gsub(/\^/,'').humanize
end