Class: Entitled::CollectionTitle

Inherits:
Title
  • Object
show all
Defined in:
lib/entitled/entitled.rb

Instance Method Summary collapse

Methods inherited from Title

#path?, #resource?

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_objectObject



111
112
113
# File 'lib/entitled/entitled.rb', line 111

def path_object
  table if @first
end

#textObject



115
116
117
# File 'lib/entitled/entitled.rb', line 115

def text
  @class_name.camelize.constantize.model_name.human.pluralize
end