Update ryo.rb

This commit is contained in:
0x1eef 2024-06-20 17:34:33 -03:00
parent d080d1277c
commit 17c7256ffa
3 changed files with 3 additions and 6 deletions

View file

@ -112,7 +112,7 @@ GEM
rubocop (>= 1.48.1, < 2.0)
rubocop-ast (>= 1.30.0, < 2.0)
ruby-progressbar (1.13.0)
ryo.rb (0.5.3)
ryo.rb (0.5.5)
sass (3.7.4)
sass-listen (~> 4.0.0)
sass-listen (4.0.0)

1
Rules
View file

@ -5,6 +5,7 @@
# Requires
require "ryo"
require "ryo/json"
require "ryo/yaml"
require "nanoc-gzip"
require "nanoc-webpack"
require "nanoc-tidy"

View file

@ -48,11 +48,7 @@ module Mixin
# @return [Ryo::Object]
# Returns the contents of nanoc.yaml as a Ryo object
def nanoc
return @nanoc if defined?(@nanoc)
@nanoc = begin
path = File.join(Dir.getwd, "nanoc.yaml")
Ryo.from YAML.load_file(path)
end
@nanoc ||= Ryo.from_yaml(path: File.join(Dir.getwd, "nanoc.yaml"))
end
include T