Class: EpubForge::Builder::Assets::Font

Inherits:
Asset
  • Object
show all
Defined in:
lib/epubforge/builder/assets/font.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Asset

#cover?, #media_type

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, options = {} )
  @filename = filename.fwf_filepath
  @name, @ext  = @filename.basename_and_ext
end

Instance Attribute Details

#extObject (readonly)

Returns the value of attribute ext.



5
6
7
# File 'lib/epubforge/builder/assets/font.rb', line 5

def ext
  @ext
end

#filenameObject (readonly)

Returns the value of attribute filename.



5
6
7
# File 'lib/epubforge/builder/assets/font.rb', line 5

def filename
  @filename
end

#nameObject (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_idObject



15
16
17
# File 'lib/epubforge/builder/assets/font.rb', line 15

def item_id
  @filename.basename.to_s
end


11
12
13
# File 'lib/epubforge/builder/assets/font.rb', line 11

def link
  FONT_DIR.join( @filename.basename.to_s )
end