Class: EpubForge::Builder::Assets::Font
- Defined in:
- lib/epubforge/builder/assets/font.rb
Instance Attribute Summary collapse
-
#ext ⇒ Object
readonly
Returns the value of attribute ext.
-
#filename ⇒ Object
readonly
Returns the value of attribute filename.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(filename, options = {}) ⇒ Font
constructor
A new instance of Font.
- #item_id ⇒ Object
- #link ⇒ Object
Methods inherited from Asset
Constructor Details
#initialize(filename, options = {}) ⇒ Font
Returns a new instance of Font.
6 7 8 9 |
# File 'lib/epubforge/builder/assets/font.rb', line 6 def initialize( filename, = {} ) @filename = filename.fwf_filepath @name, @ext = @filename.basename_and_ext end |
Instance Attribute Details
#ext ⇒ Object (readonly)
Returns the value of attribute ext.
5 6 7 |
# File 'lib/epubforge/builder/assets/font.rb', line 5 def ext @ext end |
#filename ⇒ Object (readonly)
Returns the value of attribute filename.
5 6 7 |
# File 'lib/epubforge/builder/assets/font.rb', line 5 def filename @filename end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
5 6 7 |
# File 'lib/epubforge/builder/assets/font.rb', line 5 def name @name end |
Instance Method Details
#item_id ⇒ Object
15 16 17 |
# File 'lib/epubforge/builder/assets/font.rb', line 15 def item_id @filename.basename.to_s end |
#link ⇒ Object
11 12 13 |
# File 'lib/epubforge/builder/assets/font.rb', line 11 def link FONT_DIR.join( @filename.basename.to_s ) end |