Class: PageTitle::Base
- Inherits:
-
Object
- Object
- PageTitle::Base
- Extended by:
- Forwardable
- Defined in:
- lib/page_title.rb
Constant Summary collapse
- ACTION_ALIAS =
Set all action aliases.
{ "update" => "edit", "create" => "new", "destroy" => "remove" }
Instance Attribute Summary collapse
-
#controller ⇒ Object
readonly
Set the controller instance.
-
#options ⇒ Object
readonly
Set the main translation options.
Instance Method Summary collapse
-
#initialize(controller) ⇒ Base
constructor
A new instance of Base.
- #simple ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(controller) ⇒ Base
Returns a new instance of Base.
26 27 28 29 |
# File 'lib/page_title.rb', line 26 def initialize(controller) @controller = controller @options = {} end |
Instance Attribute Details
#controller ⇒ Object (readonly)
Set the controller instance. It must implement the methods controller_name and action_name.
18 19 20 |
# File 'lib/page_title.rb', line 18 def controller @controller end |
#options ⇒ Object (readonly)
Set the main translation options.
21 22 23 |
# File 'lib/page_title.rb', line 21 def @options end |
Instance Method Details
#simple ⇒ Object
35 36 37 |
# File 'lib/page_title.rb', line 35 def simple title_translation end |
#to_s ⇒ Object
31 32 33 |
# File 'lib/page_title.rb', line 31 def to_s base_translation end |