Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cannot dynamically override rule #31

Open
piotrooo opened this issue Jan 13, 2016 · 0 comments
Open

cannot dynamically override rule #31

piotrooo opened this issue Jan 13, 2016 · 0 comments

Comments

@piotrooo
Copy link

I have code:

preflight = Preflight::Profiles::PDFX1A.new
preflight.rule Preflight::Rules::MaxVersion, 1.4
preflight.check(destination).each do |issue|
  puts issue.description
  puts issue.attributes
end

so I want to override MaxVersion but output is:

#<Preflight::Issue:0x007fa73059d830 @description="PDF version should be 1.3 or lower", @rule=:"Preflight::Rules::MaxVersion", @attributes={:max_version=>1.3, :current_version=>1.4}>,

as you can see :max_version is get from the profile PDFX1A.

How can I override this rule?

When I use custom class with rules:

class MyPre
  include Preflight::Profile

  profile_name 'my-pre'

  rule Preflight::Rules::MaxVersion, 1.4
end

it's working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant