Skip to content

Commit

Permalink
ruby 3.0 syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed Mar 8, 2021
1 parent ce1d7ec commit dadd2f1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/pagy.rb
Expand Up @@ -7,7 +7,7 @@
class Pagy ; VERSION = '4.0.0'

# Root pathname to get the path of Pagy files like templates or dictionaries
def self.root; @root ||= Pathname.new(__FILE__).dirname.freeze end
def self.root = @root ||= Pathname.new(__FILE__).dirname.freeze

# default vars
VARS = { page:1, items:20, outset:0, size:[1,4,4,1], page_param: :page, params:{}, anchor:'', link_extra:'', i18n_key:'pagy.item_name', cycle:false }
Expand Down
2 changes: 1 addition & 1 deletion lib/pagy/frontend.rb
Expand Up @@ -66,7 +66,7 @@ def pagy_link_proc(pagy, link_extra='')

# Similar to I18n.t: just ~18x faster using ~10x less memory
# (@pagy_locale explicitly initilized in order to avoid warning)
def pagy_t(path, vars={}) Pagy::I18n.t(@pagy_locale||=nil, path, vars) end
def pagy_t(path, vars={}) = Pagy::I18n.t(@pagy_locale||=nil, path, vars)

end
end

0 comments on commit dadd2f1

Please sign in to comment.