Sha256: c072c5bb5f54e5060c9c8dab40a72ae5ab89a9a5bd35af9d02abdccc280ce99c
Contents?: true
Size: 375 Bytes
Versions: 4
Compression:
Stored size: 375 Bytes
Contents
# frozen_string_literal: true module PageMeta class Action # rubocop:disable Style/MutableConstant ALIASES = { "update" => "edit", "create" => "new", "destroy" => "remove" } # rubocop:enable Style/MutableConstant def initialize(action) @action = action end def to_s ALIASES[@action] || @action end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
page_meta-2.0.1 | lib/page_meta/action.rb |
page_meta-2.0.0 | lib/page_meta/action.rb |
page_meta-1.1.0 | lib/page_meta/action.rb |
page_meta-1.0.0 | lib/page_meta/action.rb |