Class: Bookbinder::Package::Openbook
- Inherits:
-
Bookbinder::Package
- Object
- Bookbinder::Package
- Bookbinder::Package::Openbook
- Defined in:
- lib/bookbinder/package/openbook.rb
Constant Summary collapse
- DEFAULT_CONTENT_ROOT =
''
Instance Attribute Summary collapse
-
#mip ⇒ Object
Returns the value of attribute mip.
Attributes inherited from Bookbinder::Package
#content_root, #file_aliases, #file_system, #map, #options, #warnings
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Bookbinder::Package
#apply_transform, build, #build, #copy_to, #export, #file, #file_path, #if_file, #import, #initialize, #read, read, require_transforms, #reset_transforms, #save_open_files, #to_map, #transforms, #warn, #write
Constructor Details
This class inherits a constructor from Bookbinder::Package
Instance Attribute Details
#mip ⇒ Object
Returns the value of attribute mip.
6 7 8 |
# File 'lib/bookbinder/package/openbook.rb', line 6 def mip @mip end |
Class Method Details
.recognize(path) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/bookbinder/package/openbook.rb', line 9 def self.recognize(path) ext = File.extname(path).downcase return ( ext == '.openbook' || File.exists?(File.join(path, 'book.json')) || (ext.empty? && !File.exists?(path)) ) end |
.transforms ⇒ Object
19 20 21 22 23 24 |
# File 'lib/bookbinder/package/openbook.rb', line 19 def self.transforms @transforms ||= [ Bookbinder::Transform::Generator, Bookbinder::Transform::BookJSON ] end |
Instance Method Details
#from_map ⇒ Object
27 28 29 30 |
# File 'lib/bookbinder/package/openbook.rb', line 27 def from_map @mip = duplicate_map(@map) super end |