Class: Entitled::CollectionTitle
- Defined in:
- lib/entitled/entitled.rb
Instance Method Summary collapse
-
#initialize(class_name, first) ⇒ CollectionTitle
constructor
A new instance of CollectionTitle.
- #path_object ⇒ Object
- #text ⇒ Object
Methods inherited from Title
Constructor Details
#initialize(class_name, first) ⇒ CollectionTitle
Returns a new instance of CollectionTitle.
106 107 108 109 |
# File 'lib/entitled/entitled.rb', line 106 def initialize class_name, first @class_name = class_name @first = first end |
Instance Method Details
#path_object ⇒ Object
111 112 113 |
# File 'lib/entitled/entitled.rb', line 111 def path_object table if @first end |
#text ⇒ Object
115 116 117 |
# File 'lib/entitled/entitled.rb', line 115 def text @class_name.camelize.constantize.model_name.human.pluralize end |