Skip to content

Commit

Permalink
Merge pull request immateriel#62 from julbouln/master
Browse files Browse the repository at this point in the history
onix 2.1: add pages count
  • Loading branch information
bergalath authored Apr 20, 2017
2 parents d1530b0 + 29444a8 commit d1df847
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/onix/onix21.rb
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ class Product < SubsetDSL
elements "Extent", :subset
elements "Language", :subset

element "NumberOfPages", :text

elements "Publisher", :subset
elements "Imprint", :subset

Expand Down Expand Up @@ -481,7 +483,9 @@ def available_for_country?(country)
end

def pages
nil
if @number_of_pages
@number_of_pages.to_i
end
end

def distributor_name
Expand Down

0 comments on commit d1df847

Please sign in to comment.