linjunpop / riif

🏦 A DSL to generate QuickBooks IIF file.
MIT License
47 stars 30 forks source link

Defining a class on a trns #11

Closed lehresman closed 6 years ago

lehresman commented 11 years ago

How do I define a class on a trns? Looking through the code, it looks like I should do it like:

iif.trns do
  row do
    class "something"
  end
end

But that obviously throws syntax errors. I tried using 'klass' as the readme suggests, but there doesn't appear to be support for that. Any suggestions?

lehresman commented 11 years ago

For posterity, I worked around this issue by calling:

self.method_missing(:class, 'My Class Name')
linjunpop commented 11 years ago

@lehresman Good catch. :smile: Would you mind a Pull Request?

linjunpop commented 6 years ago

Just released v0.7.0. this should be fixed.

Tha dsl should be

iif.trns do
  row do
    klass "something"
  end
end