Class: PageMeta::Action
- Inherits:
-
Object
- Object
- PageMeta::Action
- Defined in:
- lib/page_meta/action.rb
Constant Summary collapse
- ALIASES =
rubocop:disable Style/MutableConstant
{ "update" => "edit", "create" => "new", "destroy" => "remove" }
Instance Method Summary collapse
-
#initialize(action) ⇒ Action
constructor
rubocop:enable Style/MutableConstant.
- #to_s ⇒ Object
Constructor Details
#initialize(action) ⇒ Action
rubocop:enable Style/MutableConstant
13 14 15 |
# File 'lib/page_meta/action.rb', line 13 def initialize(action) @action = action end |
Instance Method Details
#to_s ⇒ Object
17 18 19 |
# File 'lib/page_meta/action.rb', line 17 def to_s ALIASES[@action] || @action end |