Method: Wordmove::Doctor::Movefile#initialize
- Defined in:
- lib/wordmove/doctor/movefile.rb
#initialize(name = nil, dir = '.') ⇒ Movefile
Returns a new instance of Movefile.
7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/wordmove/doctor/movefile.rb', line 7 def initialize(name = nil, dir = '.') @movefile = Wordmove::Movefile.new(name, dir) begin @contents = movefile.fetch @root_keys = contents.keys rescue Psych::SyntaxError movefile.logger.error "Your movefile is not parsable due to a syntax error"\ "so we can't continue to validate it." movefile.logger.debug "You could try to use https://yamlvalidator.com/ to"\ "get a clue about the problem." end end |