oxidized icon indicating copy to clipboard operation
oxidized copied to clipboard

Monkey-patching `post` section doesn't seem to work

Open heapdavid opened this issue 2 years ago • 0 comments

Hi,

When I try to monkey-patch a post section like this:

require 'oxidized/model/ios.rb'
class IOS
  post, clear: true do
...

I get an error as though it's not able to do this for post blocks (although documentation says it should be possible)

Feb 08 09:02:52 oxidized[438306]: <internal:/usr/lib/ruby/vendor_ruby/rubygems/core_ext/kernel_require.rb>:85:in `require': /etc/oxidized/model/ios.rb:3: syntax error, unexpected label, expecting '=' (SyntaxError)
Feb 08 09:02:52 oxidized[438306]:   post, clear: true do
Feb 08 09:02:52 oxidized[438306]:         ^~~~~~

Am I making a mistake with the syntax here? It seems to work fine where we've monkey-patched cmd blocks before.

heapdavid avatar Feb 08 '24 09:02 heapdavid