You could make this code a bit more confident by doing the following:

```ruby
def path
  self.data.fetch('path', default_path)
end

def default_path
  File.join(@dir.to_s, '_posts', @name.to_s).sub(/\A\//, '')
end
```

:dart: :boom: :smiley_cat: